Absolute Basics For Setting Up Your Printing Network

Created at 11:32 Apr 08, 2005 by steve, last modified at 07:28 Mar 07, 2006

Setting Up Your Client And Your Server

All the information below can be entered in the cupsd.conf file with your favorite text editor.

For example, if I was using the text editor nedit, I'd type: nedit /etc/cups/cupsd.conf

1) Browsing must be allowed in both the client and the server

By default, CUPS allows browsing. (Redhat, SUSE are turned off by default). So both the client and the server need to be set up to accept browsing.

To accept browsing, scroll down to the Browsing directive in your cupsd.conf file and change the Off to On.

It should now read Browsing On.

2) Make sure the Server is listening to the Client

By default, this should already be set as:

This setting will listen to any address on that network. This is not the default setting for Redhat or SUSE.

If you only wanted it to listen to one network address, you could replace the * with an actual address.  For example, Listen 127.0.0.0:631

3) Set up who is allowed to be access the Server

Make sure Allow directive looks like this:

The default setting for this is:

Why set up as @LOCAL?

Eliminates the need to know other client addresses on the local network

4) Enable broadcasting from your server

No browse addresses are set by default

Why set up as @LOCAL?

Eliminates the need to know other client addresses on the local network

Listing


Comments

Submit Comment

From robertheller, 08:22 Jan 08, 2007 (score=3)

I have two Linux boxes on a local LAN, both running CentOS 4.4  and CUPS 1.1.22-0.rc1.9.11:

smaug2.deepsoft.com (IP 192.168.250.126), my print server sauron.deepsoft.com (IP 192.168.250.1), my desktop machine.

I have two print queues on smaug2.deepsoft.com: smaug2.deepsoft.com% lpstat -a color accepting requests since Jan 01 00:00 fastcolor accepting requests since Jan 01 00:00

I want both of these queues to show up on sauron.deepsoft.com.  Specifically, I want sauron.deepsoft.com to automagically see these as remote network queues.  This has worked in the past, but everytime my machines get rebooted (such as from a power failure or something), the queues vanish from sauron.deepsoft.com.  I have managed (somehow) to get cups to do this everytime, but I am failing miserably this morning.  I am *strongly* considering uninstalling cups and installing a version of LPDng on all of my Linux boxes.  I *know* I can get this to all work with LPDng.  At this point I have no confidence that CUPS can even really do this.  It says it can, but it is way too much hassle to get it to work.  BTW: there is NO web browser installed on smaug2 -- I need to use CLI tools to manage things on smaug2.

The cupsd.conf file on smaug2 is available at the URL: http://www.deepsoft.com/smaug2-cupsd.conf

The cupsd.conf file on sauron is available at the URL: http://www.deepsoft.com/sauron-cupsd.conf

Convince me not to uninstall cups and install LPRng.  CUPS has not be easy to deal with on my LAN -- it has been way too much trouble... Reply

From Anonymous, 18:01 Aug 25, 2006 (score=3)

Excellent article, but I found one thing missing that may be of use. I had a problem where the printer worked fine from the machine it was attached to, but none of the other remote machines (on the same local network) could print on it.  I found the thing that got it working was a suggestion from the Gentoo Wiki, http://gentoo-wiki.com/HOWTO_Linux_printer_sharing_with_CUPS , This was the key change after having made sure that all the <location/> lines and other parts were setup properly.  It appears that if you don't set the Port 631 option, the server only listens to itself on 127.0.0.1, and never gets any job or status requests.

"When you set up the CUPS server to be accessed from CUPS clients for printing the client will try to access the CUPS server at the port you specified or the default port of 631. A quick way to find out if the client can connect to the CUPS server is to type:

shell> telnet <cups_server_address> 631

If you are getting telnet: Unable to connect to remote host: Connection refused

this means the server has not opened outside connections to its CUPS port (631). In this case make sure that file /etc/cups/cupsd.conf on the CUPS server has the following line uncommented:

Port 631

And also, make sure the line that looks like this is commented out:

# Listen 127.0.0.1:631

These changes will allow access to the CUPS's server port from other computers.

(FWIW, The suggestion was made on an article about configuring for Gentoo, and worked on an Ubuntu server, I don't know if it works on other distros or not.) Reply

From halesgarcia, 08:34 Mar 20, 2006 (score=3)

It's essential for hosting printing to legacy systems (ironically, including Mac OS X 10.3.x clients) to set up cups-lpd on the server.  Setup documentation for cups-lpd is found in its man page but it's worth noting here for easier access of the information:

1) On the server, create the file /etc/xinetd.d/cups file and enter the following lines:

service printer
{
  socket_type = stream
  protocol = tcp
  wait = no
  user = lp
  group = sys
  passenv =
  server = /usr/libexec/cups/daemon/cups-lpd
  server_args = -o document-format=application/octet-stream
}

2) Save the changes and restart xinetd daemon:

# On BSD systems
killall -HUP xinetd

# On Linux
killall -s -HUP xinetd
Reply

From michaelthoward, 21:49 Jun 14, 2005 (score=3)

Article says: By default, this should already be set as:

Listen *:631

This setting will listen to any address on that network. This is not the default setting for Redhat or SUSE.

On RedHat it defaults to

# Lines below are automatically generated - DO NOT EDIT ... Listen 127.0.0.1:631

Q: What is the tool that automatically generates this? system-config-printer?

Q: What is the proper way to change the 'Listen' directive in /etc/cups/cupsd.conf on a RedHat/Fedora system so that it does not get overwritten?

Michael

Reply

From steve, 08:31 Jun 20, 2005 (score=3)

This is a Redhat issue. Redhat changed the integrity of CUPS and how it handles configuration. You need to disable the cups-config-daemon:

    chkconfig cups-config-daemon off
    /etc/init.d/cups-config-daemon stop

Now, you can use the article as presented.

Reply

From tet, 07:12 Jul 24, 2005 (score=3)

I've disabled cups-config-daemon as instructed above, but still my cupsd.conf gets overwritten whenever I switch off the USB printer connected to my Fedora Core 4 box.  This makes cupsd listening to only 127.0.0.1 and not responding to any requests coming from other computers.  Any suggestions? Reply

From steve, 13:55 Jul 26, 2005 (score=3)

It sounds like you need to contact Fedora on this one. Reply

From jsmeix.suse, 05:35 Apr 18, 2005 (score=3)

By default cupsd on SUSE accepts incomming browsing information but it does not send any browsing information, see http://portal.suse.com/sdb/en/2004/05/jsmeix_print-cups-in-a-nutshell.html "Configuring CUPS in the Network" Reply