Automatic Printer Driver Downloads for Windows Clients
Create the print driver share on the print server
[print$]
path = /var/lib/samba/printer_drivers/
read only = no
mkdir -p /var/lib/samba/printer_drivers/
chown -R caponato:"Domain Admins" /var/lib/samba/printer_drivers/
chmod -R 0775 /var/lib/samba/printer_drivers/
systemctl restart smbd
Grant SeDiskOperatorPrivilege
By default, `BUILTIN\Administrators` (which includes “Domain Admins”) already has this privilege. You may not need to do anything.
See: Granting Samba server privileges
Follow this guide to configure the share.
In step 5, assign:
`Domain Admins`: Full Control
`Domain Users`: Read & Execute, List Folder Contents, Read
Do not configure permissions on subfolders. All access is managed at the share level.
About Windows Drivers
See this section for details.
Use only version 3 printer drivers
Use 64-bit drivers (as defined in `smb.conf`)
Drivers must support installation on a print server
Some drivers must be unpacked or installed locally before use (look in `%TEMP%`)
Upload drivers to your print server
Ensure you have the driver folder (bare version-3 driver).
Log into Windows as a Domain Admin.
Launch Print Management.
Add your print server (`PS1`) under *Print Servers*.
Go to Drivers → Right-click → *Add Driver*. Follow the wizard and upload the files.
If the CUPS printer does not appear immediately, wait a few minutes for Samba to rescan, or reboot the server.
You can also trigger detection by browsing to `\\PS1` from Windows, double-clicking the printer (cancel any dialog), then returning to Print Manager.
Link the printer and the corresponding driver
In *Print Management*, expand the print server and go to *Printers*.
Right-click the printer → *Properties*. If asked to install a driver, click No.
Go to the *Advanced* tab → Select your driver from the dropdown.
Optionally rename the printer under the *Sharing* tab to control how it appears to clients.
Other configurations
Configure trays, duplexing, or finishers in the *Accessories* tab
Set user/group access in the *Security* tab
Note: With the `ad` idmap backend, groups must have a `gidNumber` or they won't be seen by Unix.
Set default print options under *Advanced* → *Printing Defaults*
Create a GPO to allow Windows clients to trust the print server (Point and Print)
Please note: Due to CVE-2021-34481 and related updates, installing printer drivers via Point and Print now requires local administrator rights. This cannot be bypassed with GPO alone. Preinstall drivers on client machines when possible.
See:
Recommended GPO entries - warning due above CVE chances are these will not work. Install print drivers by an admin:
Computer Configuration → Policies → Windows Settings → Local Policies → Security Options
*Devices: Prevent users from installing printer drivers*: Disabled
Computer Configuration → Policies → Administrative Templates → Printers
*Limits print driver installation to Administrators*: Disabled
*Package Point and Print - Approved servers*: Enabled
Add the FQDNs of your print servers
*Point and Print Restrictions*: Enabled
Allow only connections to specified servers
Add FQDNs separated by semicolons
Computer Configuration → Preferences → Windows Settings → Registry
Path: `HKLM\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint`
Value name: `RestrictDriverInstallationToAdministrators`
Value type: `REG_DWORD`
Value data: `0x0`
Note: This last registry setting overrides all GPOs and forces that only administrators can install print drivers, regardless of other policies.
Hopefully you now have a working print server with automatic driver download for Windows clients!
Caponato's Samba notebook. Start here or else Main menu