-------------- next part -------------- Hello everybody!!! First of all I must say that I'm not an English speaker, so this text may sound a little extrange. I apollogize..... Well, I'm having problems with the SMB printing system. I have spent a lot of time (nearly 15 hours and a houndred of configurations) in it but I could not use it as a printing server. System Configuration: One LAN with two machines. (2 meter between them) The Server: Linux box running RedHat 5.0 (Pentium II at 266 MHz. with 64 Mb of RAM) Samba version 1.9.17p4 that came with RedHat distribution. Lan connection running OK. (telnet server ,ftp server ,etc.) The Client: WfW 3.11 box (486 DX2 at 66 MHz. with 8 Mb of RAM) Lan connection running OK. (telnet, ftp, etc) The things that I can do now: a) Use the linux box as a file sharing system with SMB in a windows network. I can log in the linux box and access my files there from the WFW box whithout any problem. b) Use the WFW box as file sharing system with SMB an acces my files there from the linux box without any problem. (smbclient OK.) c) Use the linux printing system from the linux box. I can print text, postscript and everithing, so it is working perfectly. The things that I CAN'T do now: a) Use the linux box as a printing server to acces it from the WFW box.(partialy) I can see the linux printer in the WFW box, but when I send somthing to the printer, it disapears (in the "ether" I supouse).>From the WFW box I'm seeing 2 printers, but I only have one connected to the linux box(both are the same I guess). The Printers Administrator of WFW allows me to connect my LPTx port to the printer in the linux box without problems. After that I start Word 6.0 or another application like the NotePad, load a file and try to print it to the "network printer" in my linux box, the application tells me it's printing but NOTHING HAPPENDS !!!!. I have tried that many times also looking the Printer Administrator of WFW and nothing is spooled. It's like the file never reaches the Printer Administrator. On the other hand, I can normally print in a printer connected to the parallel port of the WFW box. I have read a lot of documentation, Readmes, FAQs, Diagnosis, etc. Eveybodoy sais it is very easy to use the printing system under SMB, but I can't. So I'm looking for someone not with the same problem but someone who has solved it. Next, I'm sending my configuration files of the linux box and other specifications. **************************************************************************************** FILE: /etc/smb.conf ; Make sure and restart the server after making changes to this file, ex: ; /etc/rc.d/init.d/smb stop ; /etc/rc.d/init.d/smb start [global] ; Uncomment this if you want a guest account ; guest account = nobody log file = /var/log/samba-log.%m lock directory = /var/lock/samba share modes = yes workgroup = MYGROUP printing = bsd printcap name = /etc/printcap load printers = yes server string = MYSERVER [homes] comment = Home Directories. browseable = no read only = no create mode = 750 announce as = NT load printers = yes [tmp] comment = Temporary file space. path = /tmp read only = no public = yes [public] comment = Public Files. path = /c readonly = yes [printers] comment = HP-LJ 4000 printer name = lp printer driver = HP LaserJet 4/4M path = /var/spool/lpd/lp writable = no public = yes printable = yes ******************************************************************************* FILE: /etc/printcap # # Please don't edit this file directly unless you know what you are doing! # Be warned that the control-panel printtool requires a very strict format! # Look at the printcap(5) man page for more info. # # This file can be edited with the printtool in the control-panel. ##PRINTTOOL3## LOCAL ljet4 300x300 a4 {} LaserJet4 Default 1 lp:\ :sd=/var/spool/lpd/lp:\ :mx#0:\ :sh:\ :lp=/dev/lp1:\ :if=/var/spool/lpd/lp/filter: ****************************************************************************** FILE: /etc/inetd.conf # # Version: @(#)/etc/inetd.conf 3.10 05/27/93 # # Authors: Original taken from BSD UNIX 4.3/TAHOE. # Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> # # Modified for Debian Linux by Ian A. Murdock <imurdock@shell.portal.com> # # Modified for RHS Linux by Marc Ewing <marc@redhat.com> # # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> # # Echo, discard, daytime, and chargen are used primarily for testing. # # To re-read this file after changes, just do a 'killall -HUP inetd' # #echo stream tcp nowait root internal #echo dgram udp wait root internal #discard stream tcp nowait root internal #discard dgram udp wait root internal #daytime stream tcp nowait root internal #daytime dgram udp wait root internal #chargen stream tcp nowait root internal #chargen dgram udp wait root internal # # These are standard services. # ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd gopher stream tcp nowait root /usr/sbin/tcpd gn # do not uncomment smtp unless you *really* know what you are doing. # smtp is handled by the sendmail daemon now, not smtpd. It does NOT # run from here, it is started at boot time from /etc/rc.d/rc#.d. #smtp stream tcp nowait root /usr/bin/smtpd smtpd #nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd # # Shell, login, exec and talk are BSD protocols. # shell stream tcp nowait root /usr/sbin/tcpd in.rshd login stream tcp nowait root /usr/sbin/tcpd in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd talk dgram udp wait root /usr/sbin/tcpd in.talkd ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd #dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd # # Pop and imap mail services et al # pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d imap stream tcp nowait root /usr/sbin/tcpd imapd # # The Internet UUCP service. # #uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l # # Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." Do not uncomment # this unless you *need* it. # #tftp dgram udp wait root /usr/sbin/tcpd in.tftpd #bootps dgram udp wait root /usr/sbin/tcpd bootpd # # Finger, systat and netstat give out user information which may be # valuable to potential "system crackers." Many sites choose to disable # some or all of these services to improve security. # # cfinger is for GNU finger, which is currently not in use in RHS Linux # finger stream tcp nowait root /usr/sbin/tcpd in.fingerd #cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd #systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx #netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f inet # # Time service is used for clock syncronization. # time stream tcp nowait nobody /usr/sbin/tcpd in.timed time dgram udp wait nobody /usr/sbin/tcpd in.timed # # Authentication # auth stream tcp nowait nobody /usr/sbin/in.identd in.identd -l -e -o # # End of inetd.conf ************************************************************************************* FILE: /etc/rc.d/init.d/smb #!/bin/sh # # chkconfig: 345 91 35 # description: Starts and stops the Samba smbd and nmbd daemons \ # used to provide SMB network services. # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 # See how we were called. case "$1" in start) echo -n "Starting SMB services: " daemon smbd -D -d3 daemon nmbd -D -d3 echo touch /var/lock/subsys/smb ;; stop) echo -n "Shutting down SMB services: " killproc smbd killproc nmbd rm -f /var/lock/subsys/smb echo "" ;; status) status smbd status nmbd ;; restart) echo -n "Restarting SMB services: " echo -n "smbd " kill -HUP `pidof -s smbd` echo -n "nmbd " kill -HUP `pidof -s nmbd` echo "done." ;; *) echo "Usage: smb {start|stop|restart|status}" exit 1 esac *********************************************************************************** NOTES: a) Nothing significant appears in the log files smb.log and nmb.log b) I dfined my linux box at the LMHOSTS file in the WFW directory and set up TCP/IP to read it (Advanced options in TCP/IP configuration). c) I have printed a Word document to a file in the WFW box, take it to my linux box and printed it with the "lpr myfile" without problems, even making "cat myfile > /dev/lp1" I think this situation may sound stupid to you but I really can't solve it. PLEASE HELP MEEEEEE !!!!!!! THANK YOU FOR YOUR TIME (if you are reading this at this point).
Perhaps include a "print command = lp -onb -oraw -d%p %s" in the global section of smb.conf. Also edit the printcap file to just contain the actual printer name as it appears in lpstat on your linux system. Change the [printers] section in smb.conf to just contain the "path = /usr/spool/samba", guest ok, writable and printable an browseable commands. Try this, Good luck. samba@samba.anu.edu.au wrote:> ------------------------------------------------------------------------ > Hello everybody!!! > > First of all I must say that I'm not an English speaker, so this text may sound > a little extrange. I apollogize..... > > Well, I'm having problems with the SMB printing system. I have spent a lot of time > (nearly 15 hours and a houndred of configurations) in it but I could not use it as > a printing server. > > System Configuration: > > One LAN with two machines. (2 meter between them) > > The Server: > Linux box running RedHat 5.0 (Pentium II at 266 MHz. with 64 Mb of RAM) > Samba version 1.9.17p4 that came with RedHat distribution. > Lan connection running OK. (telnet server ,ftp server ,etc.) > > The Client: > WfW 3.11 box (486 DX2 at 66 MHz. with 8 Mb of RAM) > Lan connection running OK. (telnet, ftp, etc) > > The things that I can do now: > > a) Use the linux box as a file sharing system with SMB in a windows network. > I can log in the linux box and access my files there from the WFW box whithout > any problem. > > b) Use the WFW box as file sharing system with SMB an acces my files there from > the linux box without any problem. (smbclient OK.) > > c) Use the linux printing system from the linux box. I can print text, postscript > and everithing, so it is working perfectly. > > The things that I CAN'T do now: > > a) Use the linux box as a printing server to acces it from the WFW box.(partialy) > I can see the linux printer in the WFW box, but when I send somthing to the > printer, it disapears (in the "ether" I supouse). > > >From the WFW box I'm seeing 2 printers, but I only have one connected to the linux box > (both are the same I guess). > > The Printers Administrator of WFW allows me to connect my LPTx port to the printer in > the linux box without problems. > > After that I start Word 6.0 or another application like the NotePad, load a file and try > to print it to the "network printer" in my linux box, the application tells me it's > printing but NOTHING HAPPENDS !!!!. > > I have tried that many times also looking the Printer Administrator of WFW and nothing > is spooled. It's like the file never reaches the Printer Administrator. On the other > hand, I can normally print in a printer connected to the parallel port of the WFW box. > > I have read a lot of documentation, Readmes, FAQs, Diagnosis, etc. Eveybodoy sais it is > very easy to use the printing system under SMB, but I can't. So I'm looking for someone > not with the same problem but someone who has solved it. > > Next, I'm sending my configuration files of the linux box and other specifications. > > **************************************************************************************** > FILE: /etc/smb.conf > > ; Make sure and restart the server after making changes to this file, ex: > ; /etc/rc.d/init.d/smb stop > ; /etc/rc.d/init.d/smb start > > [global] > ; Uncomment this if you want a guest account > ; guest account = nobody > log file = /var/log/samba-log.%m > lock directory = /var/lock/samba > share modes = yes > workgroup = MYGROUP > printing = bsd > printcap name = /etc/printcap > load printers = yes > server string = MYSERVER > > [homes] > comment = Home Directories. > browseable = no > read only = no > create mode = 750 > announce as = NT > load printers = yes > > [tmp] > comment = Temporary file space. > path = /tmp > read only = no > public = yes > > [public] > comment = Public Files. > path = /c > readonly = yes > > [printers] > comment = HP-LJ 4000 > printer name = lp > printer driver = HP LaserJet 4/4M > path = /var/spool/lpd/lp > writable = no > public = yes > printable = yes > > ******************************************************************************* > FILE: /etc/printcap > # > # Please don't edit this file directly unless you know what you are doing! > # Be warned that the control-panel printtool requires a very strict format! > # Look at the printcap(5) man page for more info. > # > # This file can be edited with the printtool in the control-panel. > > ##PRINTTOOL3## LOCAL ljet4 300x300 a4 {} LaserJet4 Default 1 > lp:\ > :sd=/var/spool/lpd/lp:\ > :mx#0:\ > :sh:\ > :lp=/dev/lp1:\ > :if=/var/spool/lpd/lp/filter: > > ****************************************************************************** > > FILE: /etc/inetd.conf > # > # Version: @(#)/etc/inetd.conf 3.10 05/27/93 > # > # Authors: Original taken from BSD UNIX 4.3/TAHOE. > # Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> > # > # Modified for Debian Linux by Ian A. Murdock <imurdock@shell.portal.com> > # > # Modified for RHS Linux by Marc Ewing <marc@redhat.com> > # > # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> > # > # Echo, discard, daytime, and chargen are used primarily for testing. > # > # To re-read this file after changes, just do a 'killall -HUP inetd' > # > #echo stream tcp nowait root internal > #echo dgram udp wait root internal > #discard stream tcp nowait root internal > #discard dgram udp wait root internal > #daytime stream tcp nowait root internal > #daytime dgram udp wait root internal > #chargen stream tcp nowait root internal > #chargen dgram udp wait root internal > # > # These are standard services. > # > ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a > telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd > gopher stream tcp nowait root /usr/sbin/tcpd gn > > # do not uncomment smtp unless you *really* know what you are doing. > # smtp is handled by the sendmail daemon now, not smtpd. It does NOT > # run from here, it is started at boot time from /etc/rc.d/rc#.d. > #smtp stream tcp nowait root /usr/bin/smtpd smtpd > #nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd > # > # Shell, login, exec and talk are BSD protocols. > # > shell stream tcp nowait root /usr/sbin/tcpd in.rshd > login stream tcp nowait root /usr/sbin/tcpd in.rlogind > #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd > talk dgram udp wait root /usr/sbin/tcpd in.talkd > ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd > #dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd > # > # Pop and imap mail services et al > # > pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d > pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d > imap stream tcp nowait root /usr/sbin/tcpd imapd > # > # The Internet UUCP service. > # > #uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l > # > # Tftp service is provided primarily for booting. Most sites > # run this only on machines acting as "boot servers." Do not uncomment > # this unless you *need* it. > # > #tftp dgram udp wait root /usr/sbin/tcpd in.tftpd > #bootps dgram udp wait root /usr/sbin/tcpd bootpd > # > # Finger, systat and netstat give out user information which may be > # valuable to potential "system crackers." Many sites choose to disable > # some or all of these services to improve security. > # > # cfinger is for GNU finger, which is currently not in use in RHS Linux > # > finger stream tcp nowait root /usr/sbin/tcpd in.fingerd > #cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd > #systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx > #netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f inet > # > # Time service is used for clock syncronization. > # > time stream tcp nowait nobody /usr/sbin/tcpd in.timed > time dgram udp wait nobody /usr/sbin/tcpd in.timed > # > # Authentication > # > auth stream tcp nowait nobody /usr/sbin/in.identd in.identd -l -e -o > # > # End of inetd.conf > > ************************************************************************************* > FILE: /etc/rc.d/init.d/smb > #!/bin/sh > # > # chkconfig: 345 91 35 > # description: Starts and stops the Samba smbd and nmbd daemons \ > # used to provide SMB network services. > > # Source function library. > /etc/rc.d/init.d/functions > > # Source networking configuration. > /etc/sysconfig/network > > # Check that networking is up. > [ ${NETWORKING} = "no" ] && exit 0 > > # See how we were called. > case "$1" in > start) > echo -n "Starting SMB services: " > daemon smbd -D -d3 > daemon nmbd -D -d3 > echo > touch /var/lock/subsys/smb > ;; > stop) > echo -n "Shutting down SMB services: " > killproc smbd > killproc nmbd > rm -f /var/lock/subsys/smb > echo "" > ;; > status) > status smbd > status nmbd > ;; > restart) > echo -n "Restarting SMB services: " > echo -n "smbd " > kill -HUP `pidof -s smbd` > echo -n "nmbd " > kill -HUP `pidof -s nmbd` > echo "done." > ;; > *) > echo "Usage: smb {start|stop|restart|status}" > exit 1 > esac > *********************************************************************************** > > NOTES: > > a) Nothing significant appears in the log files smb.log and nmb.log > b) I dfined my linux box at the LMHOSTS file in the WFW directory and set up TCP/IP > to read it (Advanced options in TCP/IP configuration). > c) I have printed a Word document to a file in the WFW box, take it to my linux box and > printed it with the "lpr myfile" without problems, even making "cat myfile > /dev/lp1" > > I think this situation may sound stupid to you but I really can't solve it. > > PLEASE HELP MEEEEEE !!!!!!! > > THANK YOU FOR YOUR TIME (if you are reading this at this point).
*- Ernesto Silva wrote about "SMB printing server problem... HELP ME !!!" | FILE: /etc/smb.conf | [snip] | | [printers] | comment = HP-LJ 4000 | printer name = lp | printer driver = HP LaserJet 4/4M | path = /var/spool/lpd/lp | writable = no | public = yes | printable = yes It looks like you need a 'print command' line. Something like print command = /usr/bin/lpr -r -Plp %s right now you aren't telling samba how to print the file. | | ******************************************************************************* | FILE: /etc/printcap | # | # Please don't edit this file directly unless you know what you are doing! | # Be warned that the control-panel printtool requires a very strict format! | # Look at the printcap(5) man page for more info. | # | # This file can be edited with the printtool in the control-panel. | | | ##PRINTTOOL3## LOCAL ljet4 300x300 a4 {} LaserJet4 Default 1 | lp:\ | :sd=/var/spool/lpd/lp:\ | :mx#0:\ | :sh:\ | :lp=/dev/lp1:\ | :if=/var/spool/lpd/lp/filter: If you are using the printers driver on the windows maching you don't need a input filter(if), this will just send the info directly to the printer. If you are not using the printers driver then just make sure the filter you have defined can handle the type of file format you are sending it. It is *much* better in my opionion to use the Windows printer driver designed for that printer an just pass the print directly to the printer. You will be able to take full advantage of its features and will not have to rely on ghostscript or whatever to convert the postscript you give it to a file format that probably is not utilizing the full potential of the printer. Hope this helps, -- Brian --------------------------------------------------------------------- "Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes." - unknown Mechanical Engineering servis@purdue.edu Purdue University http://www.ecn.purdue.edu/~servis ---------------------------------------------------------------------
I don't know who this addressed to because for some reason your email address didn't come across, hopefully you are watching the list. I can't see anything glaringly wrong with your configuration, so you are going to need to do some detective work. You need to track what is happening. First thing to do is just to stop the print queue using lpc. i.e. lpc stop lp Then print your file and see if it lands in the queue (lpq -Plp). If it does then check the file in /var/spool/lpd/lp (it will be in file beginning with df). How does it compare with the file you ftp'd over and printed? You will then have to try and find out why lpd is screwing ip. However I think it more likely that it doesn't make it to the queue and you do indeed have a samba problem. Up the debugging level on smbd (either kill it and restart it with smbd -D -d9) or edit your smb startup file. In the log (/var/log/samba-log.???), there should be detail about what is happening. Start by searching for lpr in there. See if there are any errors. You should at least be able to see the connection between the PC and Samba. If not then there is no connection happening, in which case I would start looking more closely at the PC. If you find some errors, maybe these will help you track it down. It may just be something dumb, like Samba can't find the lpr program, or maybe its calling another program. I hope this helps Damian> Hello everybody!!! > > First of all I must say that I'm not an English speaker, so this text may sound > a little extrange. I apollogize..... > > Well, I'm having problems with the SMB printing system. I have spent a lot of time > (nearly 15 hours and a houndred of configurations) in it but I could not use it as > a printing server. > > System Configuration: > > One LAN with two machines. (2 meter between them) > > The Server: > Linux box running RedHat 5.0 (Pentium II at 266 MHz. with 64 Mb of RAM) > Samba version 1.9.17p4 that came with RedHat distribution. > Lan connection running OK. (telnet server ,ftp server ,etc.) > > The Client: > WfW 3.11 box (486 DX2 at 66 MHz. with 8 Mb of RAM) > Lan connection running OK. (telnet, ftp, etc)-- ______________________________________________________________________ * Damian Ivereigh * || || * Cisco Systems, Inc. * * MIS Printer Admin * .||||. .||||. * 408-526-4413 * * Linux Bigot * ..:||||||:..:||||||:.. * 800-800-1180 x64413 * * damian@cisco.com * cisco Systems, Inc. * Fax: 408-527-2563 * *______________________________________________________________________*
I've never setup printing to samba within WfW311 so I'll just give examples of how I have set things up for NT/W95... Firstly you may like to go to /etc/rc.d/init.d/ and edit lpd Change the line daemon lpd to daemon lpd -l This makes lpd put status messages in /var/log/messages so you can see what's happeneing. Of course you'll need to stop/start after the change. I have many printer spools and I don't configure them seperately in smb.conf, I just use the standard All Printers.. ---- ; NOTE: There is NO need to specifically define each individual printer [printers] comment = All Printers path = /var/spool/samba browseable = yes printable = yes ; Set public = yes to allow user 'guest account' to print public = yes writable = no create mode = 0700 ---- I've also made /var/spool/samba writable by anyone Your printcap entry looks ok, but you may not want the if: entry if you don't do printer accounting. Good Luck, Alex