Samba Printing Tips

Samba Prining tips
The printable = Yes line must always be present in Samba printer shares, even in the [printers]
section. It is also important to have a naming convention that prevents printers from having the same
name as users. The [homes] section automatically creates a share for each user with that username,
so it cannot be also a printer share.
To troubleshoot the print command, you can da a little trick in smb.conf. Instead of the actual print
command, construct the printers section in smb.conf like this.
path = /var/spool/samba
writable = no
printable = Yes
public = yes
print command = echo "lpr -r -P’%p’ %s" >> /tmp/bsdprint.log
Nothing will be printed, but you can test the print command that is generated by Samba. In this case,
the log file looks like this.
[root@RHEL4b samba]# cat /tmp/bsdprint.log
lpr -r -P’HP400’ smbprn.00000012.ARQtkM
lpr -r -P’HP400’ smbprn.00000013.YbFkuN
lpr -r -P’HP400’ smbprn.00000017.NeDuGj
[root@RHEL4b samba]#
Here is a list variables that are used by Samba for printing.
%s filename with path (of the file to be printed)
%f filename without path
%p name of the destination unix printer
%j print job number

Forex Trading