Setting up Automatic Printer Driver Downloads for Windows Clients

Revision as of 16:58, 31 October 2015 by Mmuehlfeld (talk | contribs) (Major rewrite and restructuring)


Windows Point'n'Print driver deployment is a process, administrators uses to upload and preconfigure drivers on a Windows/Samba print server. This allows users to simply connect a printer. The driver is downloaded from the print server automatically, installed (no need for local administrator permissions) and the preconfigured settings are applied.

In Windows 8/Server 2012, Microsoft introduced a the new printer driver model version 4, that is currently not supported by Samba. However, this doesn't mean newer Windows versions can't print via a Samba print server. All Windows versions (2000 up to 10 and Server 2000 to 2016) support the driver model version 3, whose support is included in Samba for a long time. For further information on the driver model versions and the differences, see

Important notes:

  • If you want to provide Point'n'Print support for drivers, used on different architectures (typically 32-bit and 64-Bit Windows), you have to upload a driver with the same name for all that architectures! This is the only way to define the default printer settings just once on a platform of your choice. And when the driver is downloaded to a host with a different architecture, these default values are used as well. However this requires, that the driver name is exactly the same for each platform. E. g. "HP Universal Printing PS" for x86 and "HP Universal Printing PS (v5.5.0)" for x64 would't match, because of the different name! Choose exactly the same driver for all platforms, you want to support.
  • Drivers for x64, can only be uploaded from a x64 Windows! Drivers for the x86 architecture can be uploaded from 32- and 64-bit Windows.

In the following, we assume, that you have successfully setup Samba as a print server and a printer is already shared.

Granting print operator privileges

Users and groups, who should be able to upload and preconfigure printer drivers, need the "SePrintOperatorPrivilege" privilege granted. Due to this is a local setting, this is required on on all print servers individually.

This is required on Samba Domain Members, because they have their own, local SAM database. It is recommended to grant the privilege to a domain group, so changes can be done centralized and easily by adding/removing users from that group without touching the print server. To view the current privilege list on a host, run

# net rpc rights list accounts -U'SAMDOM\administrator'

To grant SePrintOperatorPrivilege to the "Domain Admins" group, run

# net rpc rights grant 'SAMDOM\Domain Admins' SePrintOperatorPrivilege -Uadministrator
Enter SAMDOM\administrator's password:
Successfully granted rights.

Setup the [print$] share

To enable Point'n'Print support, a share named "[print$]" must exist. This share name is hard coded in Windows clients and can't be altered!

  • Add the share to your smb.conf
       path = /srv/samba/Printer_drivers/
       comment = Printer drivers
       writeable = yes
  • Create the folder that will later contain the drivers:
# mkdir -p /srv/samba/Printer_drivers/
The subdirectory structure is created on the fly by Samba, when uploading drivers.
  • Set permissions on the share
It is recommended, that normal users just have read-only access to the share, while the group granted the SePrintOperatorPrivilege to ("Domain Admins" in the example), is able to write to that share. Permissions can be set using
Name Permissions Apply to
Creator Owner Full control Subfolders and files only
Authenticated Users Read & execute, List folder contents, Read This folder, subfolders and files
SYSTEM Full control This folder, subfolders and files
Domain Admins Full control This folder, subfolders and files
# chgrp -R "SAMDOM\Domain Admins" /srv/samba/Printer_drivers/
# chmod -R 2755 /srv/samba/Printer_drivers/

Uploading printer drivers for Point'n'Print driver installation

If you have already uploaded the driver for your printer in the past, you can skip this section.

The following steps are done on a 64-bit platform, because 64-bit Windows allows uploading drivers for x86 and x64:

  • Start the "Print Management" console (printmanagement.msc)
  • Expand the "Print Servers" node. If your print server isn't listed, add it by right-clicking / "Add/Remove Servers..."
File:Add Printserver.png
  • Navigate to "Drivers" below your print server. Right-click and choose "Add driver" to upload a new driver to your server
File:Print Management Add Driver.png
  • The "Add Printer" wizard will appear
  • Select the driver architecture you want to upload (upload one by one) and click "Next"
  • Click the "Have Disk..." button and browse to the directory containing the driver you want to upload
  • The wizard will show you a list of all drivers, the directory you pointed to, contains. Select the appropriate driver for your printer and click "Next".
Remember: If you upload drivers for additional architectures for one printer, they need all to have exactly the same name! Otherwise the driver can't be associated and used with different platforms!
File:Printer driver selection.png
  • In the end, the wizard will copy all required files to the [print$] share of your print server
  • If you want to upload drivers for a different platform or other devices, repeat the steps
  • The drivers list in the Print Management Console provides you a list of drivers on your print server and for which platform they are available.
Print Management Driver List.png

Associating a shared printer with a driver and pre-configuration

  • Start the "Print Management" console (printmanagement.msc)
  • Expand the "Print Servers" node. If your print server isn't listed, add it by right-clicking / "Add/Remove Servers..."
File:Add Printserver.png
  • Navigate to the "Printers" node of your print server, to list all shared printers
File:View remote printers.png
  • You could do the association of the driver with the printer share on Windows or on *nix side:
  • On Windows:
  • Right-click to the shared printer, and choose "Properties"
  • If there's no driver associated with an printer yet, you'll been asked if you want to install the driver now. Answer this question with "No"!
File:Question install driver.png
  • A default printer properties window will appear. Go to the "Advanced" tab and choose the already uploaded driver from the list, that fits to your printer.
FAQ: An uploaded driver is not shown in the list, when trying to associate it with a printer.
File:Choose driver.png
Note: You may receive an "Printer settings could not be saved. Operation could not be completed (error 0x0000007a)" error. This can be ignored. The changes are saved anyway. See Bug #10482.
  • Close the windows with "OK" to save the changes
  • If you do this step on Vista or higher, Windows will ask you, if you trust the server. This message can suppressed by a GPO. See Setting up a GPO for trusting printer drivers). Choose „Install driver“, if you are seeing this window.
File:Question trust printer.png
  • After associating the driver, Windows renames the printer to the driver name. You can leave that or rename it back again. For more clearness, it's recommended to set the name on Windows side than used in smb.conf.
Note: Renaming the printer via the Printer Management console is only possible by editing the printers properties - not via [F2] (See Bug #10770).
  • On the Samba print server:
  • Retrieve a list of all drivers, that are on the [print$] share
# rpcclient localhost -U administrator -c 'enumdrivers'
  • Associate the driver with the printer (The driver name, must be exactly the same, like in the output of the above „enumdrivers“ output):
# rpcclient localhost -U administrator -c 'setdriver "MyDemoPrinter" "HP Universal Printing PS"'
  • You can review the associations with
# rpcclient localhost -U administrator -c 'enumprinters'
  • On Windows, now right-click and choose "Properties" again, to preconfigure the printer
  • First take a look on the tab names of the properties window. Typically there's a tab called "Device Settings", "Settings", "Configuration" or something similar (depending on the driver). Those tab usually allows to configure the main printer settings (number of trays, duplex on/off, etc.). Set the values fitting to your device and click the "Apply" button.
File:Device Settings.png
  • On the "Sharing" tab, you can check "List in the directory", to publish the printer in your Active Directory, what makes it easier for users to find.
  • To preconfigure the printers default settings, go to the "Advanced" tab and click the "Printing defaults..." button. A new window will appear. It's layout and possibilities differ and depend on the driver. Here you set the default values, the user will receive, when connecting the printer.
File:Printing defaults.png
  • To save the changes, click "OK"

If you had uploaded drivers for multiple architectures for that printer, the settings will be retrieved connecting on the different platforms - regardless on which they have been set. However as mentioned earlier, this requires, that all drivers for each platform have the same name.


An uploaded driver is not shown in the list, when trying to associate it with a printer

Windows clients only permit associating a driver with a printer, when the uploaded driver matches the architecture reported by the spoolss server. Samba reports "Windows NT x86" by default. This causes, that when you had uploaded just a 64-bit driver, you won't see it in the list, when you try to associate it with the printer it's "Advanced" tab. There are three ways to workaround:

  • Set the following (undocumented) parameter in your [global] section of your smb.conf, to make spoolss announce itself as x64 architecture:
spoolss: architecture = Windows x64
  • Assign the driver with rpcclient.
  • Additionally upload a x86 version of the driver with exactly the same name.

Point'n'Print doesn't deliver the drivers on all architectures

Make sure that you have uploaded exactly the same driver for that printer for all architectures. E. g. "HP Universal Printing PS" for x86 and "HP Universal Printing PS (v5.5.0)" for x64 wouldn't match, even if they are shipped in the same driver package!