Archive for March, 2007
Simple Samba Printserver on Debian GNU/Linux 4.0 (Etch)
[Updated to fix some strings that got mangled by wordpress – the instructions should make more sense now]
This is a follow on to my previous blog –
Simple Samba PDC on Debian GNU/Linux 4.0 (Etch) where we looked at how to configure Samba as a simple PDC for your network. One of the benefits of having a domain controller like this is that it can simplify the configuration of printers by your users.
Rather than each user having to install their own drivers, configure up the printer settings and generally struggle with such administration tasks, you can configure your Samba server to push these configuration details to the users.
In the previous article you saw how we had the following lines in our smb.conf
load printers = yes
printing = cups
printcap name = cups
These ensure that printers configured in our cups server are available for use through Samba.
We also have the following special shares defined in our smb.conf
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
public = yes
writable = no
create mode = 0700[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
write list = root, @ntadmin
printer admin = root, @ntadmin
The first one is the share used for spooling print-jobs and the second is a special share used to serve printer drivers for automatic installation when users add a new printer from the Samba server.
I’ve tried to set this up in the past and had problems with permissions, thanks to the helpful people on the Samba mailing list, particularly Martin Zielinski and Dale Schroeder I’ve managed to surmount those problems and now have a working configuration.
Summarising the tips from Martin and Dale here is the procedure for configuring printing with Samba,
Check your permissions
- On the Samba server, Note that
/var/lib/samba/printers
needs to be writeable by users in thentadmin
group (unless you are going to do all your print management as the root user which is inadvisable).chgrp -R ntadmin /var/lib/samba/printers
and
chmod -R g+w /var/lib/samba/printers
should ensure permissions are correct on the share.
- On Windows, login as a user in the
ntadmin
group and verify the permissions on theprint$
share by clicking on Start and then Run… and executing\\sambaserver\print$
. At this point, if you’re using the Debian Samba packages you should see 2 subdirectories:W32X86
andWIN40
. - Try adding a new folder here as a test. If you can’t, you’ll need to check your permissions (is the user you are logged in as in the
ntadmin
group and does thentadmin
group have write permissions in that folder?).
Install the printer driver on the server
- Firstly, on the Samba server, ensure the user you are connecting with on Windows has the rights to add new printer drivers. You may need to run the following to grant those privileges,
net rpc rights grant smulcahy SePrintOperatorPrivilege
- On Windows, open the printer properties window by clicking on Start and then Run… and executing
\\sambaserver
. - Change into the Printers and Faxes.
- Right click on the blank/white area of the resulting window and select Server Properties from the drop-down menu.
- Select the middle tab – Drivers.
- Click Add and follow the instructions to add the printer driver to your system. In my case I was installing a driver for a HP Color LaserJet 2500l. I initially downloaded the driver from HP’s website and ran the installer. It placed the driver files in a subdirectory of
C:\Program Files
. When adding the printer driver, I selected the Have Disk option and then provided the path to this subdirectory.
Configure your printer
- On Windows, again change into the Printers and Faxes folder.
- Right-click on a printer, select Properties and click the Advanced tab.
- Select the driver you installed previously from the drop-down box.
- You can also configure various other properties (including the default paper size) for the printer at this point by selecting the various tabs.
- When finished click Ok.
Your printer is new configured with an automatically installing driver and your desired default settings! These same settings will be used on any new clients added to your network and connected to that printer.
Categories
Archives
- September 2010
- February 2010
- November 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- November 2007
- September 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- September 2006
- July 2006
- June 2006
- April 2006