CUPS Print Server

Printing within most GNU/Linux Systems (and even other Unix Operating Systems such as Mac OSX) is based on a server application called CUPS or Common UNIX Printing System. When setting up printing within your network, CUPS allows you to designate a single server (or servers) to handle the printing for your entire network. This has the benefit of reducing the administration overhead (which normally occurs when every client acts as a "print server"), as well as giving you the ability to manage your print output to enable advanced features such as user quotas, etc.

This guide will take you through the process of installing a Printer within Suse Linux Enterprise, enabling the Print Server for your network, configuring client computers to print to the server, as well as show you how to easily administer your Print Server using a web page.

Installing a Printer

With most GNU/Linux distributions, there are quite a few different ways to add a printer to the system: each Desktop Environment has it's own way, you can utilize a special "web page" to add a printer, each Distribution may have a different process, etc. With Suse Linux (and the Yast Printer Module in particular), not only is it relatively easy to add/remove printers, but you can also control the more advanced functions of the CUPS Print Server through a graphical application.

Selecting the Connection

When you first start the Yast Printer Module you are presented with the "Printer Configuration" page which has an overview of all of the printers/devices installed on the machine (if you installed any). To add a device to your machine simply click on the "Add" button at the lower left of the page. The procedure of adding a printer is pretty straight forward, so I will just touch on some issues you may encounter.

Most printers that you add to a server will probably be printers that are connected to an HP Jetdirect or similar device or have an embedded "network card". To be able to print to these devices you would select "Print Directly to a Network Printer". Then enter the Hostname (or IP Address) of the Jetdirect device or the printer's Network Adapter. Once that connection is configured, you then have the option of installing a printer driver or not. If the printer is simply going to be used through Samba for Window Printing, you do not need to provide a driver.

Selecting the Type of Network Printer

Configuring a TCP Port Printer


Selecting the Type of Network Printer and Configuring a TCP Port Printer

Creating the Queue and Selecting Printer Driver

Over the last few years, the availability of drivers for the CUPS software has dramatically improved (especially since Mac OSX utilizes the CUPS software). Because of this, Suse Linux Enterprise provides an extensive library of already loaded Printer Drivers. It also allows for an easy way to add Manufacturer drivers that you can downloaded from the Internet, or you can even utilize some Manufacturer's Windows Postscript Driver for their Postscript Printers. If you are unsure about which driver to utilize with your printer, or if you want to see if your printer will even work with CUPS, check the website.

Creating the Print Queue

Selecting the Printer Model

Creating the Print Queue and Selecting the Printer Model

Once the Driver is selected (if you chose to install the driver), you are then presented with the configuration page for the Printer Driver. Here, fill in all the relevant options you have installed on the Printer (such as duplex unit, paper trays and paper sizes, etc.).

Adjusting the Printer Configuration

Assigning Restrictions to the Printer Queue

Adjusting the Printer Configuration and Adjusting Print Queue Permissions

On the configuration screen, you do have the option of setting restrictions to that printer. Here you can restrict specific users from being able to print to the printer. This may be useful to deter some people from misusing certain printers (such as the ones that are costly to operate).

Configuring the CUPS Server

Once you install all the printers for your network, you should now configure CUP's "Server Settings" to allow other GNU/Linux or Unix machines to be able to print over the network.

If you are simply "serving" the printers to Microsoft Windows machines, you do not need to configure CUPS' "Server Settings" if you are going to utilize the Samba SMB Server. Samba will pretty much automatically share the printers you have already setup within CUPS. However, if you are going to manually configure your Windows clients to print directly to the CUPS server you will need to follow these steps.

Adjusting the CUPS Server Settings

Assigning Permissions to the CUPS Server

Adjusting the CUPS Server Settings and Assigning Permissions to the CUPS Server

To adjust the "Server Settings" for the CUPS server you need to open the Yast "Printer" module that is located under the Hardware section. Once it is open, you will need to click the "Other" drop-down button and select "CUPS Expert Settings". You will then be presented with a few areas that you can adjust the CUPS server, the "CUPS Server Settings" option is where you need to go.

The Server Settings page is separated into a few sections - Browsing Settings, Access Settings and an easy way to adjust the Firewall to allow access to the CUPS port of the Server.

Browsing Settings - This section allows you to specify Addresses that you want your server to "Broadcast" it's printers to. Browsing allows any workstation on your network to "automatically install" the printers you have on your server. This is only used for other operating systems that use the CUPS software (other GNU/Linux Distributions, Unix and MacOS workstations).

The addresses you enter can be either single addresses, or you can utilize the "Broadcast" address for your IP range. For instance: will "Broadcast" the printers to every workstation that is on the network.

Access Settings - This section allows you to change the permissions that various Addresses has on the Server. For instance, you will probably want the Application Order to be "Deny, Allow", then you would add any addresses (or range of addresses) you want to be able to remotely access the CUPS server. A good default is to add "Allow from @LOCAL" to allow any local addresses to be able to access (and print) your server.

The Access Settings section also gives you the opportunity to fine-tune the permissions for the "/(root)", "/printers", "/admin" and "/classes" features of the CUPS server. The next section will fully cover these "features", but in a nutshell, you can specify which addresses are allowed to print to the printers, print to "printer classes" or Administer the server through the web interface.

Just remember, if you are using the Samba Server for Windows clients, you do not have to enable any of the "Server Settings" for the CUPS server. However, if you need to print from other Unix type servers or workstations you must at least open the port in the firewall and add those addresses (or the entire networks IP range) into the "Access Settings" section.

Using the Web Interface to Manage CUPS

Although most of the configuration of the CUPS Server can be accomplished through the Yast Printer Module, there are times when you may want to utilize CUPS' web interface. For instance, you can monitor all of the printers on the server, create "printer classes" and delete print jobs from the web interface.

To enable the web interface, you must first ensure that you adjust the "Access Settings" of the server to allow certain IP addresses to access the server (this was covered in the last section). Then you must create a "printer user" on the server that will allow you to "login" to the web interface to adjust settings. You can do this with the following command (where "printeradmin" is the username you wish to use).

	lppasswd -g sys -a printeradmin

Accessing the Web Interface for the CUPS Server

Administration Options from the Web Interface

Accessing the Web Interface and the Admin Options for the CUPS Server

Once you enable access and create a user, you should now be able to connect to the web interface using port number 631 - for instance: http://server1.private.lan:631/

You may be wondering what is meant by the term "printer classes". Well, printer classes are basically a number of printers that are grouped together to spread the print jobs across it's members. This allows you to offer both high-speed printing, as well as "fault tolerant" printing where a faulty printer would not stop production. On the client side, printer classes look just like standard printers and should be configured accordingly.

Managing a Printer from the Web Interface

Creating a Printer Pool Using the Web Interface

Managing a Printer and Creating a Printer Group Using the Web Interface

Printer classes can be comprised of basically any printer model, but it is common practice to ensure that the basic feature set of the printers be similar. For instance, you would probably want to have all printers in the printer class to support duplex printing if you want that feature to be included with the printer class.

Configuring Clients to Print Through CUPS

Configuring Microsoft Windows Clients

When dealing with Microsoft Windows Clients, there are two ways to configure them to print to CUPS servers. The most popular way is to utilize the Samba server, as this service will automatically share the CUPS printers. This method is covered in-depth in the Samba Chapter of this book.

The second way to configure a Windows machine to print via a CUPS server is to manually create a printer on the client that will send the print job directly to a printer on the CUPS server. This is more of a brute force way to print to a CUPS server, but can be useful in certain circumstances.

Selecting a Network Printer

Entering the Printer Address as a URL

Selecting a Network Printer and Entering the Printer Address as a URL

The first step to configure a Windows Client to print in this way is to start the Add Printer Wizard. You are probably very familiar with these steps, but to communicate with the CUPS Server, you must configure it as a "Network Printer" and you must manually enter the Address of the CUPS printer on your server. For example: "http://server1.private.lan:631/printers/hpdeskjet"

Once you point to the correct address, continue on in the Add Printer Wizard and it will ask you for the correct driver to use. You can either use a specific driver for that particular printer, or you can simply use one of the Apple Postscript drivers that are already available.

Assigning a Driver to the CUPS Printer

New CUPS Printer Listed

Assigning a Driver to the CUPS Printer and the New Printer Listed

Configuring a SLED Client

When configuring Suse Linux Enterprise Clients for printing you have the option of configuring them in a few ways. Each way has it's benefits and drawbacks and you must decide which way would be the best for that particular client. These Ways include:

CUPS Client Only - This configuration directly ties your print queue to the print queue(s) of the server. This is the most secure method of configuring your clients, but has the drawback of only being able to print to one server (which probably isn't a problem with most networks) and having all of the printers from the server listed on your client.

CUPS Using Broadcasting - This configuration simply "listens" for the CUPS Server broadcast and automatically adds any printers that are present on the servers that are broadcasting their presence on the network.

Remote IPP Queue - This configuration allows you to manually add remote printers to your machine. This, of course, is the most labor intensive way of adding printers, but it does give you the advantage of only adding the printers to the machine that makes sense (the printer is within the general vicinity).

Selecting the Connection

Configuring a Client Only Machine

Selecting the Connection Type and Configuring a Client Only Machine

Configuring CUPS to Listen to Broadcasts

Adjusting CUPS Permissions to Allow Broadcasts

Configuring CUPS to Listen to Broadcasts and Adjusting CUPS Permissions to Allow Broadcasts

Configuring a Connection to a Remote Queue

Configuring the Remote Queue

Configuring a Connection to a Remote Queue and Configuring that Queue

Google Ad

© 2017 Mike Petersen - All Rights Reserved