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 »»

Getting a Brother MFC-8480DN Printer/Scanner/Fax and OpenVZ to Play Nice on CentOS 5

Background

About a month ago I purchased a MFC aka. an AIO printer/scanner/copier/fax device which was networkable via ethernet. I chose the Brother MFC-8480DN and I’ve been very pleased with it. It replaced another Brother laser printer, a HL-1440 which I never had a single problem with; but our aging SCSI (yes a SCSI) HP scanner had recently given up the ghost. Rather than buy another single purpose scanner, I thought I could consolidate some space in our home office by buying an All-in-One device.

I’ve been extremely satisfied with our choice, except for the lack of drivers available for scanning under Linux. I wasn’t really overly concerned given this particular device was just released as a new product in Q1/2009. My previous Brother printer, which I had since 2002, was supported under Linux from day 1 and looking at the Brother website, pretty much all of their products are too.

Just to be on the safe side I decided to contact customer support just to see if one of the existing devices could be substituted in for my model number. I quickly received an email in which the customer rep. said it wasn’t currently available, but to check back at their website in about 1-2 months and it would be. So I did tonight (June/2009) and was pleasantly surprised to find that indeed, new drivers were available for my device. So I downloaded the new drivers and installed them into one of my OpenVZ VEs as follows.

Before I get started I just wanted to mention that I’ve really grown to liking OpenVZ and have pretty much converted most of my SOHO infrastructure to using it. It really gives me tremendous flexibility in quickly creating containered instances of OSes so that I can play around with things without trashing any of my existing systems.

Getting Started

For this particular setup I already had a devoted instance of OpenVZ just for CUPS, so I opted to use this VE to setup both the printing and scanning capabilities. NOTE: In this howto, I’m only going to focus on what Brother calls Scanning to a file.

1
2
3
4
5
6
7
8
9
10
11
# requires sane backend
yum install sane-backends
 
# install the brother drivers
rpm -ivh --nodeps brscan3-0.2.6-1.i386.rpm
 
# configure the scanner
brsaneconfig3 -a name=mfc8480dn model=MFC-8480DN ip=192.168.1.14
 
# setup the server daemon (scans to a file)
brscan-skey-0.2.1-3.i386.rpm

Scanning to a File

This is where there is a small server daemon (brscan-skey), which is able to talk to the scanner, and receive scanned files as either JPG or PNG files (I think it supports other formats too). You can launch it like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# brscan-skey's usage
#
% brscan-skey -h
USAGE: brscan-skey [option]
This tool enables you to scan a document by using the
Scan key on the Brother MFC through the network.
 
 no option     :register all network MFCs
 -t            :terminate this tool
 -p PASSWD     :set the password
 -u USERNAME   :set the user name
 --diagnosis   :print diagnosis data 
 -h            :help
 
# Here I am starting up the server daemon!
#
% brscan-skey

NOTE: Eventually I’ll want to throw together a start/stop script for brscan-skey and incorporate it into this VE as a full fledged service. For now, every time this system reboots I’ll have to manually start it!

Walkthrough

These files are then stored on the system that is running brscan-skey. When this is working I can basically walk up to the MFC-8480DN, stick a piece of paper on the glass, press the scan button, and have the JPG/PNG file get automatically dumped to my server.

  • Initial screen on MFC-8480DN LCD after pressing the Scan button
initial LCD

initial LCD


…. Continue reading → Getting a Brother MFC-8480DN Printer/Scanner/Fax and OpenVZ to Play Nice on CentOS 5 »»

Setting up a linux workstation to use a centrally managed CUPS installation

I always forget to do this every time I setup a new client in my network so I’m writing it down here. I have a print server in my intranet and use CUPS to share my printers out to my linux and windows machines. The mis-config shows up like this to start:

1
2
% lpq
lpq: error - no default destination available.

It usually takes a couple of minutes to remember/figure out what I’m doing wrong here. Then it dawns on me that I need to modify the client.conf file. In order to get a client machine running CUPS to know about a print server I have to modify its client.conf file.

Add this to the file, /etc/cups/client.conf which is usually empty to start:

1
ServerName print.bubba.net

Restart cups and you should be all set.

1
/etc/init.d/cups reload