Friday, February 23, 2007

Implementing a Linux print server with CUPS

Recently we've been having trouble with the reliability of our Windows 2000 based print server. Print jobs were becoming stuck in the queue. Typically this had to start happening the week when all the students need to print out their coursework. Murphy's law strikes again. *sigh*

Anyway, I elected to press one of our spare Linux boxes into service as a temporary print server and migrate to it room by room. I chose to use one of our spare AMD64 based standalone server machines (previously used as a temporary server for our VLE).

On the software side of things I used the following:

Ubuntu Linux 6.06 LTS (Server Install)
Samba + Winbind
GhostScript ESP

On the printer side of things we mainly have Brother based printers. They generally fall into two categories. Either they support Postscript or they are GDI printers and require a Foomatic driver (the Brother HL1250 driver) to work. There's also a HP 4000 Laserjet and a Lanier photocopier. Both of these print fine with PCL6.

There were a couple of hiccups when configuring the print server. The general procedure is the configure CUPS then try and print from that. Then once CUPS works attempt to hook Samba up to the CUPS back end and print via Samba from a Windows PC. Apart from some stupid mistakes typoing IP addresses configuring CUPs there was no problems getting CUPS to print.

Things got a little more involved on the Samba side of the equation. Firstly I misread the documentation and didn't realise I needed the Postscript driver from Windows. Secondly I had no admin access to the print server from Windows because the default group for 'Administrator' was set to 'Domain Users' rather than 'Domain Admins'. Finally, because Samba was running as a member server on a domain I couldn't log in as 'root', I finally figured out I had to use 'localmachine\root' for my login to work. All of these little hang ups are obvious in hindsight, but they did cause me some serious confusion at the time.

I'm currently in the process of moving the client machines over to the new print server. I've had no complaints of strange or missing printouts so it looks like things are going well.