Guest Dale E. Moore Posted October 31, 2007 Report Share Posted October 31, 2007 (edited) Howdy Y'all; smbprint seems to be working fine, but; my lpr to smbprint fails. "lpr -Pshp4 /root/bua1.log" from PC netserver to PC michelle fails but "cat /root/bua1.log | smbprint" works. [root@netserver ~]# uname -a Linux netserver.medsamerica.com 2.2.9-19mdk #1 Wed May 19 19:53:00 GMT 1999 i586 unknown [root@netserver ~]# cat /etc/issue Linux Mandrake release 6.0 (Venus) Kernel 2.2.9-19mdk on an i586 root@Michelle:/var/log/samba# uname -a Linux Michelle 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 GNU/Linux root@Michelle:/var/log/samba# cat /etc/issue Ubuntu 7.04 \n \l [root@netserver ~]# lpc status shp4 shp4: queuing is enabled printing is enabled no entries no daemon present //netserver/etc/printcap: shp4:shp4:SMB HP4 on PC Michelle: \ :mx#0:\ :lp=/dev/shp4:\ :sd=/var/spool/lpd/shp4:\ :af=/var/spool/lpd/shp4/acct:\ :if=/usr/bin/smbprint: //netserver/var/log/messages: Oct 31 09:20:55 netserver lpd[14352]: restarting shp4 Oct 31 09:20:57 netserver last message repeated 3 times Oct 31 09:20:58 netserver lpd[14352]: shp4: job could not be printed (cfA000AzXH6Pj) Oct 31 09:26:22 netserver kernel: parport0: PC-style at 0x378 [sPP,ECP,ECPPS2] Oct 31 09:26:23 netserver kernel: parport0: no IEEE-1284 device present. Oct 31 09:26:23 netserver kernel: lp0: using parport0 (polling). Oct 31 09:26:24 netserver kernel: lp0 off-line Any suggestions you have are much appreciated! Dale E. Moore UPDATE: I've got that to work and want to share with you some highlights that might be useful to you and others in the future. CMEDS netserver fct_client connects to PC Michelle as mich but it still doesn't print. facetTerm says they don't print to Linux client just Windows client. For Linux print Linux to Linux and to look at CUPS. smbprint from PC CMEDS to PC Michelle might just be the answer. It's working now! Here's what I did: 1. Setup HP4 on PC Michelle for SAMBA printing allowing anyone to print; test that Windows can print. 2. netserver# vi /tmp/printTest; chmod a+r /tmp/printTest 3. cat /tmp/printTest | /usr/bin/smbclient "\\\\michelle\\HP4" medsam -U root -N -P 4. //netserver/etc/printcap: shp4:shp4:SMB HP4 on PC Michelle: \ :mx#0:\ :lp=/dev/shp4:\ :sd=/var/spool/lpd/shp4:\ :af=/var/spool/lpd/shp4/acct:\ :if=/usr/bin/smbprint: 5. touch /dev/shp4 /tmp/smb-print.log; mkdir /var/spool/lpd/shp4; mkdir /var/spool/lpd/shp4/acct; chmod a+rw all of 'em 6. lpr -Pshp4 /tmp/printTest 7. Use "watch lpstat -t" on PC Michelle to check on printing; and tail /tmp/smb-print.log /var/log/messages to look for errors. Get it to work as root, then lp, then the users. Many thanks for all your help! Dale E. Moore Edited October 31, 2007 by Dale E. Moore Quote Link to comment Share on other sites More sharing options...
Guest Dale E. Moore Posted November 3, 2007 Report Share Posted November 3, 2007 Howdy Y'all; After I rebooted the submitting computer (CMEDS netserver) lpr doesn't print again. [dalem@netserver /client/user/dalem]$ lpr -Pshp4 Cmeds.err lpr: connect: Connection refused jobs queued, but cannot start daemon. [dalem@netserver /client/user/dalem]$ cat Cmeds.err | smbprint + logfile=/tmp/smb-print.log + spool_dir=/var/spool/lpd/shp4 + config_file=/var/spool/lpd/shp4/.config ++ cat /var/spool/lpd/shp4/.config + eval server=michelle service=HP4 password=medsam user=root ++ server=michelle ++ service=HP4 ++ password=medsam ++ user=root ++ date + echo 'Fri Nov 2 16:38:18 CST 2007 user host netserver.medsamerica.com' + echo 'smbserver michelle, smbservice HP4, smbuser root' + echo translate + echo 'print -' + cat + /usr/bin/smbclient '\\michelle\HP4' medsam -U root -N -P Prints OK. So the lpr sub-system got reset when CMEDS, netserver got rebooted? /var/log/messages Nov 1 17:29:07 netserver syslogd 1.3-3: restart. [root@netserver ~]# strace lpr -Pshp4 /client/user/dalem/Cmeds.err >t1.txt 2>>t1.txt ... socket(PF_UNIX, SOCK_STREAM, 0) = 3 connect(3, {sun_family=AF_UNIX, sun_path="/dev/printer"}, 14) = -1 ECONNREFUSED (Connection refused) fstat(1, {st_mode=S_IFREG|0644, st_size=6264, ...}) = 0 mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000 close(3) = 0 write(1, "lpr: connect: Connection refused"..., 71) = 71 munmap(0x40015000, 4096) = 0 _exit(0) = ? I had something working on CMEDS but rebooting killed it. Any suggestions are very much appreciated! Dale E. Moore Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.