System Administration Guide: Advanced Administration

Printer Configuration Resources

This section describes the resources that the print software uses to locate printer names and printer configuration information.

The print software can use a name service, which is a network (shared) resource for storing printer configuration information for all printers on the network. The name service, LDAP, NIS, NIS+, or NIS+ (xfn), simplifies printer configuration maintenance. When you add a printer in the name service, all print clients on the network can access the printer.

How the Print Software Locates Printers

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

Figure 2–3 How the Print Client Software Locates Printers

Illustration of 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 the following example.


      % lpr -P galaxy:neptune filename
      
    • Context-based style, as shown in the following 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 name 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

      • NIS+ xfn (FNS) printing contexts