Using the CUPS Web Interface

The CUPS web interface can be viewed from a browser using port 631 (see Figure 19-8). By default, SUSE's settings allow only administrative changes through the browser interface when connecting from the local machine. This can be changed in the cupsd.conf file, but for now we will look at administering the server from a browser running on itself. So from the local machine, you need to browse to http://localhost:631.

FIGURE 19-8

The CUPS web interface

FIGURE 19-8

The CUPS web interface

Some of the functions that are available simply provide information. Others can change the set up. Administrative rights are required on the CUPS server and, when you access these functions, an authentication dialog box is displayed (see Figure 19-9).

FIGURE 19-9

The CUPS web interface with authentication dialog box

Authorisation Dialogue <iihatter> f O X

%

You need to supply a username and a password to access this site.

Site:

CUPS dt localhost

U^erriame:

1 1

password:

1 1 0 Keep password

fiK | i X Cancel

The SUSE default settings will accept the user root and the root password at this point. Alternatively you can create a CUPS user from the command line using a command like the following:

Ippasswd -g sys -a roger

This adds the pre-existing system user roger as a CUPS user and prompts you for a password. After doing this, roger becomes a CUPS user with the ability to administer CUPS through the web interface. Now you can log into the administrative interface as this user and administer the CUPS server. Oddly, however, on recent SUSE versions, the authentication mechanism that is used is the system's standard authentication, so the password that you set with the Ippasswd command is irrelevant. When you are logged in, you can perform all administration tasks from the web interface, including adding printers. The changes you make will then be written back to the CUPS configuration files, /etc/cups/.

The user information is specific to CUPS and is stored in the file /etc/cups/passwd.md5.

Working with Classes in CUPS

One of the nice features of CUPS is the fact that you can create a class of printers (for example, a group of printers in a certain physical location). The class will consist of a set of printers to which the CUPS server can print, whether locally connected or across the network. After a class is set up, users' print jobs will be printed on any one of the printers in the class to which they have access.

In the web interface, you can add a class (you will be prompted for its name, location, and description, which can all be arbitrary). You then add printers to the class from the list of printers that CUPS already knows about. Figure 19-10 shows you how to add a class in the CUPS web interface.

FIGURE 19-10

Adding a class in the CUPS web interface

FIGURE 19-10

Adding a class in the CUPS web interface

After the class is set up, the CUPS server offers the class as a print queue. From a client you can then select that queue to print to in the YaST printer module (see Figure 19-11).

FIGURE 19-11

Selecting a class as default queue in YaST

• VoSTSiciflominso <&flflmingo> _ □ X

l

Hostname

_ CUPS Server

Enlcr ihe hcral name ol your

CUPS server.

To verify lh® name, use Test

Server Name

•hawer |*|j loofc up * |

lest Remote IPP Access

□ Use Servers Deteul! Queue

QefaiJt Queue

|salos UookUp

I Back ! | Abed | _ ■ 1 OK 1 1

For example, if you are configuring a Windows system to print to the class queue called sales, you would choose http://hatter:631/printers/sales.

Allowing Remote Access to the CUPS Web Interface

As we mentioned earlier in the chapter, by default, CUPS does not allow you to log in to its web interface from a remote location. If you want to change this, you have to edit the file /etc/cups/cupsd.conf. In the section that begins

<Location /admin>

add a line

Allow from @LOCAL

Then save the file and restart CUPS:

rccups restart

Now you can use the web interface from other machines on the local network. Of course you can restrict this to a single IP address if you want by replacing @LOCAL by that IP address.

Was this article helpful?

0 0

Post a comment