July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  
86

Categories

Archives

Howto Install Windows Print Drivers onto a Central Samba Share

If you’ve followed my blog for a while you’ve probably noticed that I like to automate just about everything. I can’t stand doing anything manual, at least more than once. So of course when I setup a network printer, I like to have the Windows drivers that go along with each printer available automagically over the network. This technique isn’t glaringly obvious so I thought I’d quickly document how I accomplished it.

Background

This technique requires that you already have both Samba & CUPS servers setup and configured. You should also already have the printer whose drivers we’re going to install configured and working through CUPS. You can read how I did this for the MFC-8480DN printer in this previous post.

Getting Started

First things first, you typically want to grab a copy of the Windows drivers for your particular printer. Remember, in this example I’m using the network capable, Brother MFC-8480DN, that I discussed in this previous post. I downloaded the Windows drivers from the Brother’s website here. Here’s a link the specific driver bundle that I used. Brother calls this bundle the “Add Printer Wizard Driver”. I then set them aside, so I could focus on getting the special Samba share, print$, configured. This is a special share where print drivers for all versions of Windows can be staged, for later consumption by Windows client systems that add this printer.

Samba

adding the print$ share

For my setup, which is a CentOS 5 system, I added the following stanza to my /etc/samba/smb.conf file.

1
2
3
4
5
6
7
8
9
# /etc/samba/smb.conf
 
[print$]
  comment = Printer Driver Download Area
  path = /etc/samba/drivers
  browseable = yes
  guest ok = yes
  read only = yes
  write list = @samba-printers, root

NOTE: The unpacked driver files that get added to the print$ share will be stored under /etc/samba/drivers on the Samba server. You can put them really anywhere, but I chose to keep them with the Samba config. files.

samba-printers Linux Group

Next, I created a special Linux group that I arbitrarily called samba-printers. Users in this group, in addition to root, will be the only users that have permission to add Windows drivers to the print$ Samba share. I accomplished this by adding the line below to the /etc/group file on the Samba server.

1
2
3
# /etc/group file on Samba server
 
samba-printers:x:1020:root,user1,user2

The 2 user accounts, user1 & user2, are both Linux accounts as well as Windows accounts. In my home network I typically create them this way to make things like this simpler. If you happen to user different user accounts on Windows vs. Linux you can map the Windows accounts to Linux accounts through the Samba config. file /etc/samba/smbusers.

creating /etc/samba/drivers

Next, I created the directory /etc/samba/drivers and permissioned it with our newly created Linux group using these commands:

1
2
mkdir -m ug+rwx,o-w,g+s /etc/samba/drivers
chgrp samba-printers /etc/samba/drivers


…. Continue reading → Howto Install Windows Print Drivers onto a Central Samba Share »»