[Samba] Procedure for installing Windows drivers on Samba with CUPS

Tim Vangehugten timvangehugten at gmail.com
Thu May 16 07:22:50 MDT 2013


I have spend a lot of time searching for a solution to automatically
install printerdrivers over the network until I stumbled on this.
I followed your method with samba 4.0.5 in Ubuntu 12.04 and a windows 7
professional x64 client and everything worked. I had some problems at
finding ntprint at first but this tutorial:
helped me to obtain it. Now my drivers are automatically installed, if
only the printing in samba 4.0.5 would work that would be nice...

Best regards
Tim Vangehugten

2013/5/13 Adam Nielsen <adam.nielsen at uq.edu.au>

> Hi all,
> This isn't a plea for help, but rather I have just been through the
> procedure for installing Windows drivers on a Samba machine using CUPS, and
> I thought I'd post my notes in case it helps someone one day as the
> documentation doesn't focus too strongly on my particular set up (it
> focuses on using Windows drivers without CUPS, or PostScript drivers with
> CUPS, but there's less about using Windows drivers with CUPS.)
> So if you are using CUPS and Samba, and you want to use "point-n-print" on
> your Windows machines with the manufacturer's drivers (in this case Ricoh
> MFDs) here is the process, which has only been tested on Win 7 64-bit, and
> assumes you have already set up the print$ share and can write to it from
> the Windows machine you will be using for this procedure.
>  1. Create a new CUPS print queue.  IPP works best, but any protocol will
> do (IPP causes usernames and job titles to appear on our machines' front
> panels.)
>  2. Select the "Raw" manufacturer, with the "Raw Queue" model and continue
> until the queue is ready.
>  3. "killall -HUP smbd" to make it see the new printer, possibly even
> killing your own session ("smbstatus | grep username" then "kill" those
> PIDs.)
>  4. Run \\server and on the menu below the normal menu (where it says
> Organize, Search, etc.) choose the last option "View remote printers". This
> view allows remote printers to be examined without trying to install them.
>  5. If the printer is not visible, in the address bar type in
> \\server\queuename and then cancel anything that comes up, and go back and
> refresh the list of printers.  The missing queue should now be visible.  It
> seems to take a while before it will show up reliably.
>  6. Right-click properties on the new printer, and when asked to install
> the '' driver, it is *very* important to say no.
>  7. On the Advanced tab click New Driver, then follow the prompts.  If the
> New Driver button is greyed out, you need to give yourself more
> permissions.  Giving permission to an AD group doesn't seem to work, you
> seem to have to grant your own (Windows) user print management permissions
> with the 'net' command (on the Linux box.)  This worked for me:
>   $ net -U server\\root rpc rights grant 'DOMAIN\username'
> SePrintOperatorPrivilege
> 8. In the New Driver window, click Have Disk and find the driver you want
> to install.
> 9. If you get an error about needing x64 drivers, edit the driver's .inf
> file in the driver and replace all instances of "NT.5.1" (or higher) with
> "NT.5.0".  If this doesn't work, duplicating the 64-bit stuff and putting
> it in a header for 32-bit works too (but this is only advisable if you
> don't have any 32-bit Windows machines.)
> 10. Click OK to close the printer properties and don't worry if you get a
> weird error.
> 11. Click properties again and you should see the full printer properties
> with the new driver.
> 12. On the Sharing tab click "Additional Drivers" and install the x64
> drivers (it seems to install only 32-bit ones.)  If you are prompted for
> where to install them from select the same driver again.
> 13. On the Advanced tab make sure you click Printing Defaults and change
> something and apply the changes so the default settings aren't null (you
> can change it back, but usually you have to change it to A4 or set
> paper-to-tray assignments anyway.)
> 14. On the General tab make sure the queue name matches the CUPS queue
> name.  Some drivers change this from something like "my-queue" to "Bob's
> Fantastic Printer Company PCL 6", but you won't be able to install the
> printer on client machines if the names don't match.
> 15. You should be able to double-click on the printers from client
> machines normally and have the driver install automatically now.  If you
> get prompted for admin access and you're connected to a domain, add your
> Samba server in to the approppriate group policy so drivers can be
> installed from it with no elevation required.  Plenty of pages on Google
> explaining this.
> 16. If you get an error installing the printer (something about being
> unable to install the driver), wait for a few hours as this often helps.
>  Maybe restarting Samba would help too, but for us it was a production
> machine so that wasn't possible.
> I have successfully used this procedure to install four Ricoh MFDs and
> their fax driver, so I hope this guide comes in handy for someone else one
> day!
> Cheers,
> Adam.
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/**mailman/options/samba<https://lists.samba.org/mailman/options/samba>

More information about the samba mailing list