Printing : Administration

You’ve already seen the printtool and YaST administration interfaces. You can use them for most or all of your configuration needs.

Sometimes, however, a lightweight monitoring and control interface is the way to go. CUPS provides a web-based administrative tool, which makes sense, since CUPS is itself web-based. CUPS runs a small web server that will answer requests on port 631, which you can reach at the url:

http://localhost:631/admin

You’ll be asked for a user name and password; root’s is usable to start. Initially web admin access is limited to the localhost, which is a sensible precaution. However, most print (and other) servers are on a protected subnet, and you as the network administrator may be at any machine on this subnet when you need to check on CUPS.

To allow remote administration (with the usual cautions), edit the file /etc/cups/cupsd.conf file, in the /admin section.

<Location /admin>
AuthType Basic
AuthClass System
Order Deny, Allow
Deny from All
Allow from 127.0.0.1
Allow from 192.168.2.*
</Location>

Using the wildcard in the second Allow line I added lets me administer the CUPS server from any workstation on the subnet. This all by itself won’t do the job, though. Look for the Listen line:

Listen 127.0.0.1:631

and alter it to

Listen *:631

Now you can use the CUPS web admin interface from any host on your subnet. (In Red Hat, take a look at the discussion in Chapter 17 of the Red Hat Linux Bible about allowing BrowseRelay, if you need to span subnets.) And don’t forget that these changes, like all changes to services, won’t take effect until you restart the service.

From the web interface, you can now:

  • List print jobs
  • View printers
  • Stop a printer (which does not stop its queue from accepting pending jobs)
  • Reject jobs (which does stop the queue)