CUPS Print Server for Samba
Configuration
CUPS
Samba
Required smb.conf settings:
load printers = yes printing = cups printcap name = cups [printers] comment = CUPS Printers path = /var/spool/samba browseable = yes public = yes guest ok = yes writable = no printable = yes [print$] comment = Printer Drivers path = /etc/samba/drivers browseable = yes guest ok = no read only = yes write list = root, @lpadmin
About permissions
As many usual issues are related to permissions, is suggested to check carefully the logs for errors. Here are some hints:
- Share
print$
path (drivers) should be read only for normal users and writable only the by the administrator group (here lpadmin). - Users should have write access to the spool directory
- You should review the Samba-UNIX User mapping in place in your setup
Drivers
Samba (and Microsoft Print services) has the ability to push and provide the drivers for the printers it shares.
You can use either MSWindows native drivers or CUPS drivers. The advantge of the CUPS drivers is better integration with CUPS backend as well as some features like accounting.
Download
Donwload the windows drivers required:
Setup
Copy the files under /usr/share/cups/drivers/ filenames must be in UPPERCASE 2)
Setup a user with printer admin privileges on Samba.
Register printers
The most complex part should be to recreate all simulated registry stuff for the printing, this involves many and complex low level RPC operations on the Samba server, but thankfull to CUPS there is a straight forward tool for that:
cupsaddsmb -H <server> -U <user> -a -v
This will fetch the files you uploaded and register them on the Samba server, as usual I suggest to review the output (so the verbose flag) to check for errors or problems.
Problems
Support driver
Support Printer driver version 3 (from Windows 2000 to Windows 8), but not Printer driver version 4 (Windows 8)
Samba4 issues on Debian
I don't know if this affects other distributions, but Samba4 smbspool has some issues making printing totally fail. For that scenarios you can totally discard this document and setup the printing to IPP protocol directly to CUPS (so not using Samba at all). This is possible at least starting from Windows XP, simply providing the IPP URL to the Add Printer… wizard.
Show users on job list
Default configuration of CUPS hide the usernames on the jobs, showing Unknown/Withheld
. This is solved setting:
JobPrivateValues none
On the CUPS configuration