This explains how to set up a headless Ubuntu CUPS print-server which allows printing, and can be administered, over a network (without having to install the gui). This is for Ubuntu 6.06 or 6.10.
I found the following a useful reference:
/usr/share/doc/cupsys/README.Debian.gz
(only available after installing cupsys)
Set Up The Server
Install Ubuntu Server
Install from the "Alternative" CD and select Server Installation
Perform an update
apt-get update
apt-get upgrade
Install cupsys 1.2 and openssh-server
These are available from the CD, so no need to add any repositories. Eg;
apt-get install cupsys openssh-server
You can now ssh in and could do the rest remotely.
Allow remote administration of CUPS
By default the cups server only allows local access and administration. Edit the cups config file to allow us to browse the print-sever remotely.
In Ubuntu 6.10 with cupsys 1.2.4 edit: /etc/cups/cupsd.conf
In Ubuntu 6.06 with cupsys 1.2.2 edit: /etc/cups/cups.d/browse.conf
(This file is then included in cupsd.conf)
Change: BrowseAllow @LOCAL
to: BrowseAllow all
Similarly, in the blocks:
<Location /> , <Location /admin> and <Location /admin/conf>
Change from: Allow localhost
to: Allow all
Set it to listen for connections from other machines
In the config file:
change: Listen localhost:631
to: Listen 631
Set CUPS so it doesn't try to use SSL (the default setting)
In the config file:
/etc/cups/cupsd.conf
Add the line:
DefaultEncryption Never
This should avoid the error: 426 - Upgrade Required when using the CUPS web interface.
Allow CUPS to read the password file
To do admin tasks remotely using the web interface, it will ask you for a password. In order to check this password CUPS needs to be able to read the password shadow file. To do this 'cupsys' needs to be a member of the group 'shadow'.
adduser cupsys shadow
Check the print-server's name is correctly known on the network
On our network we have a server with a list of host names, which needed updating. On our system this meant using the IPCop web interface and going to: Services > Edit Hosts, and checking that the name corresponding to the print-server's IP address was correct.
You should now be able administer CUPS through the web interface from any machine on the network(!). Use the print-server's name or IP address and port 631. Eg:
http://print-server-name.networkname:631 or: 192.168.0.20:631
You can then view jobs, add and manage printers etc.
Install some good drivers
Gutenprint (formerly known as gimp-print) includes a lot of recomended drivers, including the ones that we required for our Epson printers.
apt-get install cupsys-driver-gutenprint
Now, when you go through the Add Printer process there will be far more drivers available, hopefully including the recomended ones which actually work.
Add the Printers
Connect the printers to the print-server and use the web interface to add them.
On The Client Workstations
Allow network printing
Goto: System > Administration > Printing
then goto: Global Settings > Detect LAN Printers, and make sure it is ticked.
Note: Doing the above changes a line in the config file to:
Browsing On
In Ubuntu 6.10 with cupsys 1.2.4 this line appears directly in /etc/cups/cupsd.conf
In Ubuntu 6.06 with cupsys 1.2.2 this line is in the file /etc/cups/cups.d/browse.conf, which is then included in cupsd.conf.
Specify the CUPS server
To make the workstation pick up the printers published by our print server we have to tell it the CUPS server.
If it does not already exist, make a file:
/etc/cups/client.conf
and add the line:
ServerName 192.168.0.20
substituting your printserver's IP address or name.
Notes: We shouldn't really have to do this. If the printers are added using the Ubuntu GUI Printing Admin window they simply appear on all the other machines, without us specifying a print server.
However, we wanted to run a headless print server without installing the gui, so we add them through the CUPS web interface. When we do this we have to specify the CUPS server.
The file client.conf may exist as a complete config file on some older versions (cupsys 1.1 ?).
Acknowledgement
Thanks to ethridgt for the post:
Howto: configure cups on Ubuntu Server from command line
http://www.ubuntuforums.org/showthread.php?t=240282
Bookmarks