Setting up a Print Server

A Samba print server is simply a member server that shares printers in addition to files. Any member server can serve as a print server.

Because I use small KVM domains (i.e., virtual machines) and aim for redundancy, I prefer to dedicate a separate machine for printing.

A good hostname for a print server is `PS1`.


Install and Configure a New Member Server for Printing

First things first: A print server is a member server.

but do not add the example file shares shown in the file server article to `smb.conf`.

# Printing options in [global]
printing = CUPS
spoolss: architecture = Windows x64
load printers = yes
 
[printers]
path = /var/tmp/
printable = yes
 
[print$]
path = /var/lib/samba/printer_drivers/
read only = no

Grant `SePrintOperatorPrivilege`

This privilege is required to manage printers from Windows. See: Granting Samba server privileges


Install and Configure the CUPS Printing Scheduler

apt-get update && apt-get install --no-install-recommends cups
# Listen settings
Listen /run/cups/cups.sock
Port 631
 
# Disable network printer browsing
Browsing No
BrowseLocalProtocols dnssd
 
DefaultAuthType Basic
WebInterface Yes
IdleExitTimeout 60
 
<Location />
  Order allow,deny
  Allow from 127.0.0.1
  Allow from localhost
  # Optional LAN access without password:
  # Allow from 192.168.0.0/24
  AuthType Default
  Require valid-user
  Satisfy any
</Location>

Important: If you need to rebuild or replace the print server, simply back up and restore `/etc/cups/cupsd.conf` and `/etc/cups/printers.conf`. These files contain all your CUPS configuration.


Add Printers to CUPS

This step is outside the scope of this article, but can be done via the CUPS web interface:

No printer drivers are required in CUPS for Windows clients. When adding a printer, choose “Raw” as the driver type. Windows clients will use their own drivers.

Once added, the printer will appear automatically in the print server's shares when accessing `\\PS1`.


Configure the Print Server for Automatic Windows Driver Download

You can now proceed to configure automatic driver download for Windows clients.


Caponato's Samba notebook. Start here or else Main menu