Monday, June 8, 2009

My Network Printer Setup: Part 1

My desk is too small for both my monitors and a printer so I decided to move my printer to an extra PC I have that is running the server version of Ubuntu 9.04.  After moving the printer, I need to setup the Common UNIX Printing System (CUPS) and SAMBA in order to use it from other PCs on my network.  This post will highlight the steps that I took to setup CUPS.

First, after logging into the server I installed CUPS:
sudo apt-get install cupsys cupsys-client

Then, make a copy of the CUPS config file and make it read only:
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
sudo chmod a-w /etc/cups/cupsd.conf.original

Now open the config file to edit:
sudo vim /etc/cups/cupsd.conf

In the “Listen” section add:  Listen ###.###.###.###:631
(Replace the # signs with the LAN IP address of the server)

And change the “<Location />” section to:
Order deny,allow
Deny From All
Allow From ###.###.###.*
(Replacing the # signs with the first three octets of the client computer IP address)

You also need to update the <Location /admin> section to allow the IP address of the PC you wish to allow to setup/add printers.

After making those changes, save and close the config file.

Restart CUPS:
sudo /etc/init.d/cups restart

You should now be able to access the web interface of CUPS using http://###.###.###.###:631/ (again replacing the # signs with the LAN IP address of the server).

To Add a new printer, click the Administration tab and “Find New Printers”.  It will show any locally connected printers.  “Add this printer”, fill in the info, and click Continue.  Pick the Model/Driver for the printer [I used “HP PSC 500 Foomatic/pcl3 (en)” for mine] or provide a PPD file.  Then click “Add Printer”.  Enter the username and password you log onto the server with and it should be added successfully.

You will have the option to setup a few settings, I left mine as the defaults.

Now, I can print a test page from the web interface, but I need to install SAMBA and do more configuration to be able to print from other computers on my network.

0 comments: