Sharing printers in Samba
I've tried to share a printer on a samba server with an samba client. I can't get it to work though. I've tried the following. I have one script called printsmb
----------------------------
#!/bin/sh
/usr/bin/a2ps -o - | /usr/bin/smbclient //linux/printer -I 192.168.0.107 -U username%password -c ”print -”
------------------------------------
And then I put this in printcap
---------------------------------------------
smbprinter: \
:sh:mx#0:of=/usr/local/lib/printsmb:\
:lp=/dev/null:sd=/var/spool/smbprinter:lf=/var/log/lpd-errs:
-----------------------------------------------------------------------
If I try to print by typing "lpr -Psmbprinter filename" nothing happens. I can use the code in printsmb and print files from shell if I replace ”print -” with ”print filename”.
Any tips?
|