doc:guides:smbprint

CUPS Print Server for 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

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

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.

Donwload the windows drivers required:

Copy the files under /usr/share/cups/drivers/ filenames must be in UPPERCASE 2)

Setup a user with printer admin privileges on Samba.

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 Printer driver version 3 (from Windows 2000 to Windows 8), but not Printer driver version 4 (Windows 8)

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.

Default configuration of CUPS hide the usernames on the jobs, showing Unknown/Withheld. This is solved setting:

JobPrivateValues none

On the CUPS configuration


1)
need to recompile whole cups?, Should provide direct driver download
2)
This needs to be checked, some documentation points to be LOWERCASE
  • doc/guides/smbprint.txt
  • Last modified: 2021/06/10 21:44
  • by 127.0.0.1