Printer Configuration Resources
This section describes the resources that the printing software uses 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, and
NIS+ environments are described in the following table.
naming service Type |
Default printers Entry |
files |
printers: user files |
ldap |
printers: user files ldap |
nis |
printers: user files nis |
nis+ |
printers: user nisplus files |
For example, if your naming service is NIS, printer configuration information on print
clients is searched for in the following sources in this order:
user – Represents the user's $HOME/.printers file
files – Represents the /etc/printers.conf file
nis – Represents the printers.conf.byname table
nisplus – Represents the printers.org_dir table
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
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:
Solaris Print Manager uses the ldapclient command to determine the default LDAP server name. If more than one server is specified, the first server is automatically selected. For more information, see ldapclient(1M).
Solaris Print Manager always displays printer entries from the current LDAP server. If the current LDAP server is not the domain's LDAP master server, the list of printers displayed might not be the current list of printers. The LDAP replica server might not have been updated by the master server, and as a result, is out of sync with the master. Replica servers can have various update replication agreements. For example, a change is made on the master, and the replica servers can be updated immediately or once a day.
If the selected LDAP server is an LDAP replica server, any updates are referred to the master server and are done there. This situation again means that the printer list could be out of sync with the master server. For example, a deleted printer might still appear in the displayed printer list until the replica is updated from the master server.
Users can use the LDAP command-line utilities, ldapadd and ldapmodify, to update printer entries in the directory. However, this method is not recommended. If these utilities are used, the user must ensure that the printer-name attribute value is unique within the ou=printers container. If the printer-name attribute value is not unique, the result of modifications done by Solaris Print Manager, or by the lpset command, might not be predictable.
How the Solaris 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
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
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