[Samba] Print Server in AD
Kris Lou
klou at themusiclink.net
Thu Jan 16 22:09:23 UTC 2025
On Thu, Jan 16, 2025 at 1:02 PM Aaron C. de Bruyn via samba <
samba at lists.samba.org> wrote:
> I would skip all the Windows garbage if you can. Specifically don't have
> Windows load printer drivers from shares.
>
> If it's a single office where everyone has the same printer (or the same
> multiple printers), the basic process is:
>
> Preload the drivers into the driver store
> Add an IPP printer connection to CUPS which doesn't rely on the filesharing
> / print driver hacks that were added because things are so insecure as an
> admin to make sure everything is loaded properly
> Add the printer to the user session when they sign in.
>
> To accomplish this:
> * Set up CUPS on your Samba server
> * Set up your printers in CUPs (preferably using the IPP driver) and test
> that CUPS prints
> * Don't bother with any config for printing in Samba or loading drivers
> * Download the printer drivers somewhere, unzip, extract, etc... They can
> live on a Samba or Windows share, or they can be downloaded to every
> machine (our script just downloads/extracts them to
> c:\printers\{some-printer-name}\)
>
> Use any number of available tools to execute processes directly on all the
> workstations as an administrator. PDQ Inventory/Deploy is a good combo for
> dealing with Windows networks, but there are plenty of other automation
> tools out there that can launch a script:
> * pnputil /add-driver \\path\to\extracted\driver\*.inf /subdirs/install
> * add-printerdriver -name "HP Universal Printing PCL 6" (or whatever you
> printer driver's name is in the INF file)
> * add-printer -name "MyPrinter" -DriverName "HP Universal Printing PCL 6"
> -PortName "https://mycupsserver.customer.tld:631/printers/MyPrinter"
> (MyPrinter is the name of the printer in CUPS)
>
> Now you have an IPP Printer in Windows that prints to the CUPS server that
> turns around and prints to the actual printer using IPP (or whatever you
> chose).
>
> For the user session, create c:\programdata\microsoft\windows\start
> menu\programs\startup\map_printers.cmd and run:
> powershell -command "Add-Printer -Name \"MyPrinter\" -DriverName \"HP
> Universal Printing PCL 6\" -PortName \"https://mycupsserver.customer.tld
> :631/printers/MyPrinter\""
>
I do pretty much the same:
* Deploy driver packages (manufacturer Universal packages where possible)
to the clients
* call "rundll32 printui.dll,PrintUIEntry" to map the printer, specifying
the local driver and the CUPS-IPP port as the destination
More information about the samba
mailing list