System Administration Guide: Printing

Chapter 2 Planning for Printing (Tasks)

This chapter provides information about planning for printer setup by using Solaris Print Manager or the LP print service.

This is a list of the information that is in this chapter:

Determining a Method to Use for Printer Setup and Administration

The following sections describe printing services, tools, and protocols that you might choose to use for setting up and administering printers in the Oracle Solaris release. Each tool, service, and protocol has advantages and disadvantages. Some tools and services are more appropriate for specific uses, while others can be used for all, or most, printing tasks that you might perform. Unless otherwise mentioned, the following printing tools are available in the Oracle Solaris 10 and compatible Oracle Solaris releases. Also, all of these printing services and tools use LDAP, NIS, and NIS+.

Selecting Printing Tools and Services

This section describes the tools you can use to perform printer setup and related tasks.

The following tools are available in the Oracle Solaris release:

Solaris Print Manager

Solaris Print Manager, /usr/sbin/printmgr, is a Java technology-based GUI that you use to perform setup tasks for local and remote printers, either directly attached and network-attached.

For directly attached and network-attached printers, you can perform the following tasks:

For remote printers, you can use Solaris Print Manager to define access to the print queue. Note that a remote printer is a printer that has a print queue that is defined on a system other than the local system. For more information about terminology that is commonly used in this book, see Glossary.

lpadmin Command

The lpadmin command, /usr/sbin/lpadmin, is a command-line tool that you can use to perform all of the tasks that you can perform by using Solaris Print Manager performs. Several additional tasks that cannot be performed by using Solaris Print Manager can be performed by using the lpadmin command. For more information, see Printer Definitions.

PPD File Manager

You can use the PPD File Manager utility, /usr/sbin/ppdmgr, to administer PPD files on Oracle Solaris systems. The PPD File Management utility is the preferred method for adding PPD files to a system's PPD file repository. For more information, see Chapter 11, Administering Printers by Using the PPD File Management Utility (Tasks).

Note –

For printer setup, the Solaris Print Manager tool is easier and more convenient to use than the lpadmin command. These tools provide sufficient printer attributes in most situations. However, you might need to use the lpadmin command when setting up printers with printer attributes that cannot be defined by using Solaris Print Manager.

For more information about setting up printers, see Chapter 4, Setting Up and Administering Printers by Using Solaris Print Manager (Tasks) and Chapter 5, Setting Up Printers by Using LP Print Commands (Tasks).

Planning for Printer Setup and Administration

Planning for printer setup and administration includes the following activities:

Distributing Printers on the Network

The goal of setting up printers on a network is to give users access to one or more printers. As an administrator, you must determine whether each printer would be best used if it is dedicated to one system or available to many systems. In a network environment, distribute your printers on several print servers. The advantage of setting up several print servers is that when one print server has a problem, you can route print requests to other print servers.

If you use a centralized print configuration, you can still connect printers to user systems for convenience or for improved response. A printer that is connected to a user system is still available to other systems on the network.

The following figure shows an example of how you can have a centralized print configuration and still connect printers to users' systems.

Figure 2–1 How to Distribute Printers on a Network

that shows a network with print clients, remote printers
connected to a print server, and a printer locally-connected to a print client.

Printer Configuration Resources

The printing software uses certain resources to locate printer names and printer configuration information. The printer software may be configured to use a naming service to advertise the printers. The naming service can be used for storing printer configuration information for all printers on the network. The naming service, LDAP, NIS, or NIS+, simplifies printer configuration maintenance. When you add a printer in the naming service, all print clients on the network can access the printer.

Printing Support in the Naming Service Switch

The printers database in /etc/nsswitch.conf, the naming service switch file, provides centralized printer configuration information to print clients on the network.

By including the printers database and corresponding sources of information in the naming service switch file, print clients automatically have access to printer configuration information without having to add it to their own systems.

The default printers entry in the /etc/nsswitch.conf file for files, LDAP, NIS, or NIS+ environments are described in the following table.

naming service Type 

Default printers Entry


printers: user files


printers: user files ldap


printers: user files nis

For example, if your naming service is NIS, printer configuration information on print clients is searched for in the following sources in this order:

For more information, see the nsswitch.conf(4) man page and System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).

Adding Printer Information to a Naming Service

Adding printer information to a naming service makes access to printers available to all systems on the network. Doing so makes printer administration easier because all of the information about printers is centralized.

Naming Service Configuration 

Actions to Centralize Printer Information 

Use a naming service 

Adding the printer to the LDAP, NIS, or NIS+ database makes the printer available to all systems on the network. 

Do not use a naming service 

Adding the printer adds the printer information to the printer server's configuration files only. Print clients will not automatically know about the printer. 

You will have to add the printer information to every print client that needs to use the printer. 

LDAP Print Support Guidelines

Keep the following in mind when you manage printer information in the LDAP naming service:

How the Printing Software Locates Printers

The following figure highlights the part of the print process in which the printing software checks a hierarchy of printer configuration resources to determine where to send the print request.

Figure 2–2 How the Print Client Software Locates Printers

that shows the steps the print client software uses to locate
printers. Also shows the various printer sources. See the following description.

  1. A user submits a print request from a print client by using the lp or lpr command. The user can specify a destination printer name or class in any of three styles:

    • Atomic style, which is the lp command and option, followed by the printer name or class, as shown in this example:

      % lp -d neptune filename
    • POSIX style, which is the print command and option, followed by server:printer, as shown in this example:

      % lpr -P galaxy:neptune filename
    • Context-based style, as shown in this example:

      % lpr -d thisdept/service/printer/printer-name filename
  2. The print command locates a printer and printer configuration information as follows:

    • The print command checks to see if the user specified a destination printer name or printer class in one of the three valid styles.

    • If the user didn't specify a printer name or class in a valid style, the command checks the user's PRINTER or LPDEST environment variable for a default printer name.

    • If neither environment variable for the default printer is defined, the command checks the sources configured for the printers database in the /etc/nsswitch.conf file. The naming service sources might be one of the following:

      • LDAP directory information tree in the domain's ou=printers container

      • NIS printers.conf.byname map

      • NIS+ printers.conf_dir map

Assigning Print Servers and Print Clients

You must decide which systems will have local printers physically attached to them. You must also decide which systems will use printers on other systems. A system that has a local printer attached to it and makes the printer available to other systems on the network is called a print server. A system that sends its print requests to a print server is called a print client.

The LP print service software provides printing services in the Oracle Solaris OS. Besides physically connecting a printer to a system, you must define the printer server characteristics to the LP print service. Once you have print servers set up, you can set up other systems as print clients.

Print servers and print clients can run different versions of the Oracle Solaris release and different versions of the UNIX operating system. Print clients running the Solaris 9 release and compatible versions can print to print servers that are running an LPD-based print service, such as the SunOS 4.1, BSD UNIX, and Linux releases. In addition, print clients running an lpd-based print service can print to print servers running the Solaris 9 release and compatible versions.

The following figure shows a print configuration on a network with systems running the Oracle Solaris release and an LPD-based print service.

Figure 2–3 Oracle Solaris and LPD-Based Systems Print Configuration

Figure that
shows a network with BSD (LPD-based) print clients and BSD print servers
and print
clients and print servers.

Print Server Requirements and Recommendations

You can attach a printer to a stand-alone system or to any system on the network. Any networked system with a printer can be a print server, as long as the system has adequate resources to manage the printing load.

Spooling Space

Spooling space is the amount of disk space that is used to store and process requests in the print queue. Spooling space is the single most important factor to consider when deciding which systems to designate as print servers. When users submit files for printing, the files are stored in the /var/spool/lp directory until the files are printed. The size of the /var directory depends on the size of the disk and how the disk is partitioned. Spooling space can be allocated in the /var directory on the print server, or mounted from a file server and accessed over the network.

Note –

If /var is not created as a separate file system, the /var directory uses space in the root (/) file system. The root (/) file system is likely to be insufficient on a print server.

Disk Space

When evaluating systems as possible print servers, consider their available disk space. A large spool directory can consume 600 Mbytes of disk space. Evaluate the size and division of disk space on systems that can be designated as print servers.

Also, carefully evaluate the printing needs and use patterns of print client systems. For example, assume that users in a small group typically print only short email messages, which are simple ASCII files without sophisticated formatting requirements. In this example, a print server with 20 to 25 Mbytes of disk space allocated to the /var directory is probably sufficient. If, however, many print client users are printing large documents, bit mapped images, or raster images, the users will likely fill the spooling space quite frequently. When users cannot queue their jobs for printing, work flow is interrupted. Requests for more spooling space can force you to either add disk space for spooling or designate a different system as the print server.

If the print server has a /var directory that is too small, and a larger file system is available, you can mount the larger file system on the /var directory for additional spooling space. For information about mounting file systems and editing the vfstab file, see Mounting File Systems in System Administration Guide: Devices and File Systems.

Memory Requirements

A print server does not require additional memory. However, you might find that more memory improves performance in managing print requests.

Swap Space

The swap space allocation on the print server should be sufficient to handle LP print service requirements. For information about how to increase swap space, see Chapter 20, Configuring Additional Swap Space (Tasks), in System Administration Guide: Devices and File Systems.

Hard Disk

For optimal performance, the print server should have a hard disk and a local /var directory. You should mount spooling space for a print server on a local hard disk. If a print server has its own hard disk and a local /var directory, printing is much faster. And, you can more accurately predict the time needed to process print requests.