samba printing
Mikko Heiskanen
mikko at whitecortex.net
Mon Jan 24 02:04:12 PST 2005
On Mon, 2005-01-24 at 04:48, McCy Ron wrote:
> I have/had the same problem - couldn't print to the Samba shared printer
> until I found in the
> "Handbook" a couple of line of code that were missing in my smb.conf....
>
> [printers]
> comment = Guttenburgs Pride
> printable = yes
> printing = BSD
> printcap name = /etc/printcap
> print command = /usr/bin/lpr -P%p -r %s
> path = /var/spool/samba
> min print space = 2000
> public = yes
>
> I've got a printcap setting that uses a "pass-through" filter.....
> Windows provides the drivers that talk to the printer correctly. BSD
> need only pass the bytes through.
>
> ###################################
> ### printcap setup for Samba printer share......
>
> broxima|hplj4|Samba Laser:\
> :sh:\
> :lp=/dev/lpt0:sd=/var/spool/output/broxima:\
> :lf=/var/log/smbprt-errs:\
> :if=/usr/libexec/pass-prt:\
>
> ### pass-prt ......Pass through filter........
> #!/bin/sh
> /bin/cat && exit 0
> exit
Right you are about the pass-through. I read from a webpage where there
was used a printcap entry with "raw" -driver. I understand it
accomplishes the same as the pass-through filter. Correct me if I'm
wrong.
I've done some more digging, and found the following to put into the
samba configuration file.
smb.conf:
print command = "/usr/bin/lpr -P%S /var/spool/samba/%s; /bin/rm
/var/spool/samba/%s; /bin/echo %T %U %M %I %a %S>>
/var/spool/samba/smbprint.log"
Which, ofcourse, keeps appending to the file, so one might want to
logrotate it.
So now it is working. Hope this helps others who have struggled to get
it work. Oh, and by the way, samba version is 2.2.8a.
Mikko
More information about the freebsd-questions
mailing list