This chapter explains how to set up a printer and make it accessible to systems on the network. You can perform most printer setup tasks by using Admintool. This is a list of the step-by-step instructions in this chapter.
"How to Convert Printer Information From a SunOS 5.x System"
"How to Convert Printer Information From a SunOS 4.x System"
"How to Add Printer Access on the Print Client Using Admintool"
"How to Add a Network Printer Using Printer Vendor Supplied Tools"
For overview information about printers, see Chapter 39, Print Management (Overview).
This section explains how to convert the printer configuration information from SunOS 5.x and 4.x systems at your site and copy this information to SunSoft print clients so they can access existing printers.
If you have only a few existing printers, it may be easier to add access to the printers by using Solstice Printer Manager or Admintool rather than convert the printer configuration information and distribute it to print clients. See Table 41-2 information on adding access to printers.
Table 41-1 provides an overview of the tasks you perform to convert the printer configuration information from SunOS 5.x and 4.x systems at your site and distribute the information to SunSoft print clients so they can access existing printers.
Table 41-1 Task Map: Updating Sunsoft Print Clients to Access existing Printers
Task |
Description |
For Instructions, Go To |
|||||
---|---|---|---|---|---|---|---|
Convert Existing Printer Configuration Information |
Convert Printer Configuration Information From a SunOS 5.x System. If your site uses SunOS 5.x software, convert the printer configuration information in a 5.x system's /etc/lp/printers directory to the SunSoft /etc/printers.conf configuration file. This is usually a one-time task. |
"How to Convert Printer Information From a SunOS 5.x System" | |||||
|
Convert Printer Configuration Information From a SunOS 4.x System. If your site uses SunOS 4.x software, convert the printer configuration information in a 4.x system's /etc/printcap file to the SunSoft /etc/printers.conf configuration file. This is usually a one-time task. |
"How to Convert Printer Information From a SunOS 4.x System" |
|||||
Existing printer configuration information will automatically be converted when installing or upgrading to the Solaris 2.6 release. This section explains how to convert the printer configuration information from a SunOS 5.x or 4.x system to the /etc/printers.conf printer configuration file used in the SunSoft Print Client software. You'll use one of two print administration commands to automate the conversion task:
The conv_lp command enables you to convert information in the /etc/lp/printers directory on a SunOS 5.x system to entries in the system's /etc/printers.conf file. See "How to Convert Printer Information From a SunOS 5.x System" for instructions.
The conv_lpd command enables you to convert information in a /etc/printcap configuration file from a SunOS 4.x system to entries in a /etc/printers.conf file. See "How to Convert Printer Information From a SunOS 4.x System" for instructions.
If you are not using a name service, you should create a master /etc/printers.conf file that includes the existing printers at your site. You can then copy the master file to all the SunSoft print clients or by loading it into NIS or NIS+. This is a good way to initially enable all the new SunSoft print clients access to the existing printers at your site.
If you are using the NIS or NIS+ name service to configure printer information, do not use a /etc/printers.conf file on your SunSoft print clients. A SunSoft print client uses the /etc/printers.conf file first to locate a printer; however, the /etc/printers.conf file may conflict with the printer information in the NIS or NIS+ maps and cause unexpected results. To avoid this problem, remove the /etc/printers.conf file on SunSoft print clients when you want them to use NIS or NIS+ for printer information.
Log in as superuser on a system that has SunOS 5.x software and SunSoft Print Client software installed.
Convert the printer configuration information in the system's /etc/lp/printers directory to the /etc/printers.conf file.
# /usr/lib/print/conv_lp |
Copy the /etc/printcap file from a SunOS 4.x system to a SunOS 5.x system that has the SunSoft Print Client software.
Log in as superuser on the SunOS 5.x system to which you copied the /etc/printcap file.
Convert the printer configuration information in the /etc/printcap file to the /etc/printers.conf file.
# /usr/lib/print/conv_lpd |
"Setting Up Printing Task Map" provides an overview of the tasks necessary to set up print servers (Add a Printer) and print clients (Add Access to the Printer). A local printer is one which is physically cabled to the print server; a network printer is physically attached to the network. Adding access to a printer, or adding remote access, is the process of giving print clients (all those machines which are not the server) access to the printer.
Task |
Description |
For Instructions, Go To |
|||||
---|---|---|---|---|---|---|---|
Add a Local Printer |
Using Admintool. After physically attaching the printer to a system, use Admintool to make the printer available for printing. | ||||||
|
|
|
Using LP Commands. After physically attaching the printer to a system, use the LP commands to make the printer available for printing. |
| |||
Add Access to a Printer |
Using Admintool. Add printer access on the print client using Admintool. |
"How to Add Printer Access on the Print Client Using Admintool" | |||||
|
|
|
Using LP Commands. Add printer access on the print client using the lp commands. |
| |||
|
|
|
Using a Name Service. Add printer access on the print client by setting up a /etc/printers.conf file in NIS or NIS+. |
| |||
| |||||||
|
Add Access to Existing Printers |
|
Copy a Master /etc/printers.conf File to Clients. If you don't use a name service, copy the printer configuration information in the converted system's /etc/printers.conf file to other SunSoft print clients. |
| |||
|
|
Use the /etc/printers.conf File to Load NIS. If you use NIS, copy the printer configuration information in the converted system's /etc/printers.conf file to the NIS master file. | |||||
|
|
Use the /etc/printers.conf File to Load NIS+. If you use NIS+, copy the printer configuration information in the converted system's /etc/printers.conf file to the NIS master file. | |||||
Set Up a .printers File |
Optional. Using a $HOME/.printers file enables users to establish their own custom printer aliases. | ||||||
| |||||||
Add a Network Printer |
Using Printer Vendor Supplied Tools. After physically connecting the printer to the network, use vendor-supplied software to configure the network printer. |
"How to Add a Network Printer Using Printer Vendor Supplied Tools" | |||||
|
Using LP Commands After physically connecting the printer to the network, use SunSoft supplied software to configure the network printer. | ||||||
| |||||||
Turn Off Banner Pages |
Optional. You can turn off banner pages so they are never printed. | ||||||
Set Up Fault Alerts |
Optional. You can set up more specific fault alerts for the printer than Admintool provides. | ||||||
Set Up Fault Recovery |
Optional. Admintool does not enable you to set up how a printer should recover after it faults. | ||||||
Limit Access to the Printer |
Optional. Admintool enables you to set up an allow list, but if you want to limit a few users' access to the printer, you may want to set up a deny list. | ||||||
Verify that the following prerequisites are met. To use the Admintool software, you must have:
Log in on the system where you want to set up the printer.
Start Admintool with the following command:
$ admintool & |
When you add a local printer and/or a network printer to a system, the printer is made accessible to the local system. The system on which you install the printer becomes the print server.
A printer can be added using either Admintool or the LP print service commands. The following describes how to use each of these.
Select the system which is to be the printer server.
Verify that the print server has the following print packages installed by using the pkginfo command: SUNWpcr, SUNWpcu, SUNWpsr, SUNWpsu, SUNWscplp, and SUNWpsf.
# pkginfo package_instance |
Connect the printer to the printer server and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.
Start Admintool on the printer server where you connected the printer.
See the procedure on "" for detailed information.
Select Add Local Printer from the Edit menu.
If you need information to complete a field, click on the Help button to see field definitions for this window.
Click on OK.
Exit Admintool.
Click on button in upper-left corner; select quit.
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the clients. See "Setting Up a Print Client".
Optional tasks to complete.
There are several optional tasks you may want to complete when setting up a printer. See "Setting Up Printing Task Map" for pointers to the remaining tasks.
In the following example, the printer luna is added on the print server krypton.
Adding a local printer may also be accomplished using the command line interface.
Select the system which is to be the printer server.
Verify that the print server has the following print packages installed by using the pkginfo command: SUNWpcr, SUNWpcu, SUNWpsr, SUNWpsu, SUNWscplp, and SUNWpsf.
# pkginfo package_instance |
Connect the printer to the printer server and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.
Set lp ownership and read/write access on the port device.
# chown lp /dev/term/device # chmod 600 /dev/term/device |
Define the printer name, the device, the printer type and content type by using the lpadmin command.
Add filters to the print server by using the lpfilter command
First, determine if the needed filters are installed.
# lpfilter -l -f all |
If the filter is not installed, you will see the message:
ERROR: No filter by the name "" exists. |
If you have determined that filter installation is needed, use the lpfilter command to install the filters.
# cd /etc/lp/fd # for filter in *.fd;do > name=`basename $filter .fd` > lpfilter -f $name -F $filter > done |
Allow the printer to accept printer requests and enable the printer to print the requests.
# accept printer-name # enable printer-name |
Verify the printer is correctly configured by using the lpstat command.
# lpstat -p printer-name |
(Optional) Add a description to the printer.
# lpadmin -p printer_name -D "description"
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the clients. See "Setting Up a Print Client".
Optional tasks to complete.
There are several optional tasks you may want to complete when setting up a printer. See "Setting Up Printing Task Map" for pointers to the remaining tasks.
This example shows how to make a local PostScript printer available for printing on a print server. The commands in this example must be executed on the print server where the printer is connected. The following information is used in the example and may change depending on your situation:
Printer name: luna
Port device: /dev/term/b
Printer type: PS
File content types: postscript
A print client is a system that is not the server for the printer, yet has access to the printer. A print client uses the services of the print server to spool, schedule and filter the print jobs. Note that one system may be a print server for one printer and be a print client for another printer.
Access to a remote printer may be configured on a domain-wide basis or on a per-machine basis. A combination of these two may also be used. To add access to a remote printer on a per machine basis see "How to Add Printer Access on the Print Client Using Admintool" or "How to Add Access on the Print Client using LP Commands". To add access on a domain wide basis, follow the instructions under "Adding Access to a Remote Printer Using a Name Service". See also printers.conf(4), printers(4), and lpset(1M).
Start Admintool on the system where you want to add access to a remote printer.
See the procedure on "" for detailed information.
Select Add Access to Remote Printer from the Edit menu.
The Add Access to Remote Printer window is displayed.
Fill in the window.
If you need information to complete a field, click on the Help button to see field definitions for this window.
Click on OK.
Exit Admintool.
Click on button in upper-left corner; select quit.
In the following example, the print client rogue is given access to the printer rocket on the print server enterprise.
Collect the required information.
All that is required is the name of the printer and the name of the server for that printer.
Define the printer by using the lpadmin command.
# lpadmin -p printer_name -s server_name
(Optional) Add a description to the printer.
# lpadmin -p printer_name -D "description"
Verify the printer is correctly configured by using the lpstat command.
# lpstat -p printer-name |
If you want to print to a remote printer, you must add access to the remote printer. This example shows how to configure access to a printer named luna, whose print server is saturn. The system saturn becomes a print client of the printer luna.
Using either the NIS or NIS+ maps, access to a printer may be obtained on a domain-wide basis. See nis+(1).
On the NIS master server, run the lpset command to create a printers.conf file; then create and push the map. This gives all members of the domain access to the printers defined in the map. See lpset(1M).
Become superuser on the NIS master server.
Create a printers.conf file by using the lpset command for each printer.
# lpset -a bsdaddr=server1,printer1,extensions printer1 |
-a bsdaddr=server1,printer1,extensions |
Adds the print server, printer destination, and enables Solaris protocol extensions. |
printer1 |
Specifies the printer name. |
Create and push the NIS map.
# make -f /var/yp/makefile -f /usr/lib/print/Makefile.yp printers.conf |
This example creates a printers.conf entry for the printer luna, connected to the print server, saturn. The make command pushes the printers.conf map.
# lpset -a bsdaddr=saturn,luna,Solaris -a description= "Room 1954 ps" luna # make -f /var/yp/makefile -f /usr/lib/print/Makefile.yp printers.conf |
On the NIS+ master server, use the lpset command (see lpset(1M)) to add the printer configuration information to NIS+ via XFN (see fns(5)).
Become superuser on the NIS+ master server.
(Optional) If FNS has not been initialized, create the root organization context and its subcontents for the NIS+ root domain.
# fncreate -t org org// |
Create the NIS+ map.
# lpset -n fns -a bsdaddr=server1,printer1,extensions printer1 |
This example creates a printers.conf entry for the printer luna, connected to the print server, saturn.
# lpset -n fns -a bsaddr=saturn,luna,Solaris -a description= "Room 1954 ps" luna |
Once you create a master /etc/printers.conf file that includes the existing printers at your site, you can enable all the SunSoft print clients to access the existing printers in two ways.
If you don't use a name service, you can copy the master /etc/printers.conf file to all SunSoft print clients.
If you use a name service, you can use the master /etc/printers.conf file to load the NIS or NIS+ master file, where the information becomes available to all SunSoft print clients.
Log in as superuser on the system that contains the /etc/printers.conf file to be copied to the NIS master server.
Copy the system's /etc/printers.conf file to the NIS master server's /etc directory.
Copy the /usr/lib/print/Makefile.yp makefile to the NIS master server's /var/yp directory.
Log in as superuser on the NIS master server.
On this system, specify how to process the files.
# make -f /var/yp/makefile -f /var/yp/Makefile.yp printers.conf |
Make sure you are a member of the NIS+ admin group. You must have the appropriate privileges to perform this task.
Log in as superuser on the system that contains the /etc/printers.conf file to be copied to the NIS+ master file.
Copy the system's /etc/printers.conf file to the NIS+ master file.
# fncreate_printer -f /etc/printers.conf thisorgunit/service/printer |
See the Federated Naming Service Guide in the Solaris 2.6 Software Developer AnswerBook if you need information about entering this command.
After you have given SunSoft print clients access to existing printers, users may want to set up the .printers file in their home directory to contain custom printer aliases. For step-by-step instructions, see the next section.
There is no need to set up a .printers file in your users' home directories if they don't need customized printer information. However, the .printers file enables users to establish their own custom printer aliases. You can use the alias _default to make a printer the default and also set up a special alias _all to define a list of printers affected when you cancel a print request or check the status of printers.
Keep in mind that the LP commands check a user's home directory to locate printer configuration information before they check the name service. This means you can tailor a user's printer configuration file to use custom printer information rather than the shared information in the name service.
See printers(4) for detailed information about the .printers file.
Log in to the user's system as root.
Start the file editor you want to use to create a .printers file in the user's home directory.
(Optional) Set up the _default alias to make a specific printer your default printer, using an entry similar to the one shown in the following example.
# _default printer_name |
(Optional) Set up the _all alias to define the printers affected when you cancel a print request or check the status of printers, using an entry similar to the one shown in the next example.
# _all printer1 printer2 printer3 |
Save the file as .printers.
A network printer is a hardware device that provides printing services to print clients without being directly cabled to a print server. It has its own system name and IP address, and is connected directly to the network. Even though a network printer is not connected to a print server, it is necessary to set up a print server for it. The print server provides queuing capabilities, filtering, and printing administration for the network printer.
Network printers use one or more special protocols that require a vendor-supplied printing program. The procedures to set up the vendor-supplied printing program can vary. If the printer does not come with vendor supplied support, the SunSoft network printer support may be used; it is strongly advised to use the print vendor supplied software when possible.
The vendor might supply an SVR4 printer interface script to replace the standard printer interface script. If so, their SVR4 interface script will call the vendor-supplied printing program to send the job to the printer. If not, you will need to modify the standard interface script to call the vendor-supplied printing program. You can do this by editing the per-printer copy of the standard interface script to call the vendor-supplied printing program.
The terms used in network printer configuration are:
Print server: The machine which spools and schedules the jobs for a printer. This is the machine on which the printer is configured.
Printer-host device: The printer-host device is the software and hardware supplied by a vendor which provides network printer support for a non-network capable printer. The combination of the printer-host device with one or more printers attached to it creates a network printer.
Printer node: This is either the physical printer or the printer-host device. It is the physical printer when the network support resides in the physical printer. It is the printer-host device when an external box is used to provide the network interface. The printer node name is the machine name given with the IP address. This name is selected by the system administrator and has no default or vendor requirement. The printer nodename, as with all nodes, must be unique.
Printer name: The name entered on the command line when using any of the printer commands. It is selected by the system administrator at the time of printer configuration. Any one physical printer may have several printer or queue names; each provides access to the printer.
Network printer access name: The internal name of the printer node port that is used by the printer sub-system to access the printer. It is the name of the printer node, or the name of the printer node with a printer vendor port designation. Any printer vendor port designation is explicitly defined in the printer vendor documentation. It is printer specific. In the case where the printer is a printer-host device and a printer, the port designation is documented in the printer-host device documentation. The format is:
printer_node_name
or
printer_node_name:port_designation
Protocol: the over-the-wire protocol used to communicate with the printer. The printer vendor documentation supplies the information regarding the protocol to select. The SunSoft network printer support supplies both BSD Printer Protocol and raw TCP. Due to implementation variations, you may want to try both.
Timeout, or retry interval: Timeout is a seed number representing the number of seconds to wait between attempting connections to the printer. This seed number is the smallest amount of time to wait between attemped connections, and increases with an increase in failed connections. After repeated failures to connect to the printer, a message is returned to the user requesting possible human intervention. Attempts to reconnect continue until successful or the job is cancelled by the job owner.
Network printers often have software support provided by the printer vendor. If your printer has printer vendor supplied software it is strongly advised that the printer vendor software be utilized. The software is designed to support the attributes of the printer and can take full advantage of the printer capabilities. Read the printer vendor documentation to install and configure the printer under an LP print system.
If the network printer vendor does not provide software support, the Sun supplied software is available. The software provides generic support for network printers and is not capable of providing full access to all possible printer attributes.
A general discussion of how to add a network printer is provided in Chapter 41, Setting Up Printers (Tasks). The following is a discussion of printer management using the Sun supplied software.
The software support for network printers is called through the interface script. Configuring a network printer with the network interface script, netstandard, causes the network printer support module to be called. The command to configure the printer with the network support is:
lpadmin -p printer_name -i /usr/lib/lp/model/netstandard
The print sub-system uses BSD print protocol and raw TCP to communicate with the printer. The printer vendor documentation will provide the information about which protocol to use. In general, we have found that the TCP protocol is more generic across printers.
The command to select the protocol is:
lpadmin -p printer_name -o protocol=bsd
or
lpadmin -p printer_name -o protocol=tcp
If the protocol selected is the BSD print protocol, you may further select the order of sending the control file to the printer. Some printers expect the control file, then the data file; others the reverse. See the printer vendor documentation for this information. The default is to send the control file first.
The command to select the ordering is:
lpadmin -p printer_name -o bsdctrl=first
or
lpadmin -p printer_name -o bsdctrl=last
The system administrator selects the printer node name. This name must be unique, as with any node on the network. The printer node name is connected with the IP address of the printer.
The print subsystem requires access information for the printer. This is the name that the subsystem uses when making the network connection to the printer. This name is supplied by the system administrator to the print sub-system through the lpadmin command. It becomes part of the printer configuration database. The printer access name is the name of the printer node, sometimes qualified by a port name. Port designation varies across printer vendors. You will find information about port designation in the documentation that is provided with the printer by the printer vendor. The format of printer access name is:
printer_node-name[:port_designation]
A common port designation with TCP is 9100. If the printer node name is pn1, and the printer vendor defines the port as 9100, then the printer access name is: pn1:9100. To configure a printer in this case use:
lpadmin -p printer_name -o dest=pn1:9100
When using the BSD protocol, the port designation may not be a number, but some name defined by the printer vendor, for example: xxx_parallel_1. If the printer node name is cardboard, then the printer access name is: cardboard:xxx_parallel_1. To configure a printer in this case use:
lpadmin -p printer_name -o dest=cardboard:xxx_parallel_1
If there is no port designation, and the printer node name is newspaper, the printer access name is the printer node name: newspaper. To configure a printer in this case use:
lpadmin -p printer_name -o dest=newspaper
The timeout option is provided to allow for individual selection of the amount of time (in seconds) to wait between successive attempts to connect to the printer. Some printers have a long warm up time and a longer timeout value is advised. The default is 10 seconds.
The timeout value does not impact the success or failure of the print process. It is a seed value which the software uses as the initial timeout count; on repeated failures, this count is increased. A message is sent to the spooler when repeated attempts to connect to the printer fail. This alerts the user that intervention may be required. This could be anything from the printer being turned off, to out of paper. Should these messages be produced too often, for example when the printer is warming up, increasing the timeout value will eliminate spurious messages.
The system administrator can experiment to find the optimal timeout value. The command to set the timeout is:
lpadmin -p printer_name -o timeout=n
Each network printer should have one and only one server that provides access to it. This enables the server to manage the access to the printer and keep jobs coherent.
The default device for the network printer is /dev/null. This is sufficient when there is only one queue for the printer. Should more queues be required, set the device to a file. This enables the print system to restrict access to the printer across queues. The following commands create a device file and configure it as the network printer device.
touch /path/filename chmod 600 /path/filename lpadmin -p printer_name -v /path/filename |
The following is an example of creating a device file called devtreedown.
# touch /var/tmp/devtreedown # chmod 600 /var/tmp/devtreedown # lpadmin -p treedown -v /var/tmp/devtreedown |
Connect the printer to the network and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements. Get an IP address and select a name for the printer node. This is equivalent to adding any node to the network.
Follow the printer vendor instructions to add the network printer to a SunOS 5.x system that has an SVR4 LP print spooler.
Use the printer vendor instructions to configure the network printer. These will be specific to the vendor and printer.
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the clients. See "Setting Up a Print Client".
Optional tasks to complete.
There are several optional tasks you may want to complete when setting up a network printer. See "Setting Up Printing Task Map" for pointers to the remaining tasks.
This describes the steps necessary to setup a network printer using the SunSoft Network Printer support software. The use of this software is intended for those printers that do not come with vendor supplied software.
Connect the printer to the network and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements. Get an IP address and select a name for the printer node. This is equivalent to adding any node to the network.
Collect the information required to configure a network printer.
Printer name
Printer server
Network printer access name
Protocol
Timeout
See the terms described in "Adding a Network Printer" for more information.
Define the printer name, the device, the printer type and content type by using the lpadmin command.
Define the printer name and the port device the printer will use.
# lpadmin -p printer-name -v /dev/null |
The device to use is /dev/null.
Identify the interface script the printer will use.
# lpadmin -p printer-name -i /usr/lib/lp/model/netstandard |
The interface script that is supplied with the SunSoft network printer support software is /usr/lib/lp/model/netstandard.
Set the printer destination, protocol, and timeout values.
# lpadmin -p printer-name -o dest=access-name:port -o protocol=protocol -o timeout=value |
-p printer-name |
Specifies the network printer name. |
-o dest=access-name:port |
Sets the printer destination to the network printer access name and a designated printer vendor port, if it is defined in the printer vendor documentation. See "Adding a Network Printer" for more information. |
-o protocol:protocol |
Sets the over-the-wire protocol used to communicate with the printer. Both BSD and raw TCP are supported. |
-o timeout:value |
Sets a retry timeout value that represents a number of seconds to wait between attempting connections to the printer. See "Adding a Network Printer" for more information. |
Specify the file content types of the printer and the printer type.
# lpadmin -p printer-name -I content-type -T printer-type |
Add filters to the print server by using the lpfilter command.
# cd /etc/lp/fd # for filter in *.fd;do > name=`basename $filter .fd` > lpfilter -f $name -F $filter > done |
Enable the printer to accept printer requests and to print the requests.
# accept printer-name # enable printer-name |
Verify the printer is correctly configured by using the lpstat command.
# lpstat -p printer-name |
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the clients. See "Setting Up a Print Client".
Optional tasks to complete.
There are several optional tasks you may want to complete when setting up a printer. See "Setting Up Printing Task Map" for pointers to the remaining tasks.
The commands in this example must be executed on the print server. The following information is used in the example and may change depending on your situation:
Printer name: luna1
Server: saturn
Network printer access name: nimquat:9100
Protocol: tcp
Timeout: 5
Interface: /usr/lib/lp/model/netstandard
Printer type: PS
Content types: postscript
Device: /dev/null