Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
4.  Setting Up Printers (Tasks) Adding a Network Printer How to Add A Network Printer With LP Commands  Previous   Contents   Next 
   
 

Example--Adding A Network Printer With LP Commands

The commands in this example must be executed on the print server. The following information is used as an example. The information you provide will vary.

  • 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

    # lpadmin -p luna1 -v /dev/null 1
    # lpadmin -p luna1 -m netstandard 2
    # lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp 
    -o timeout=5 3
    # lpadmin -p luna1 -I postscript -T PS 4
    # cd /etc/lp/fd
    # for filter in *.fd;do	
    	   > name=`basename $filter .fd`	
    	   > lpfilter -f $name -F $filter	
    	   > done 5
    # accept luna1
    	destination "luna1" now accepting requests
    # enable luna1	 6
    printer "luna1" now enabled 
    # lpadmin -p luna1 -D "Room 1954 ps" 7
    # lpstat -p luna1 8
    		printer luna1 is idle. enabled since Jul 12 11:17 2001.  available.
  1. Defines printer name and sets the device to /dev/null.

  2. Defines the interface script for network printers.

  3. Sets the destination, protocol, and timeout.

  4. Specifies the file content types to which the printer can print directly, and the printer type.

  5. Adds print filters to the print server.

  6. Accepts print requests for the printer and enables the printer.

  7. Adds a description for the printer.

  8. Verifies that the printer is ready.

Converting Printer Configuration Information

This section explains how to convert the printer configuration information from systems running the SunOS 5.5.1 release and copy this information to print clients so they can access existing printers.


Note - If you have only a few existing printers, it might be easier to add access to the printers by using Solaris Print Manager rather than convert the printer configuration information and distribute it to print clients. For information on adding access to printers, see "Setting Up Printing (Task Map)".


Converting Printer Configuration Information (Task Map)

The following task map identifies the tasks associated with converting printer configuration information.

Task

Description

For Instructions

Convert Existing Printer Configuration Information

Convert Printer Configuration Information for Systems Running the SunOS 5.5.1 Release - If your site uses the SunOS 5.5.1 release, you can convert the printer configuration information in the /etc/lp/printers directory to the /etc/printers.conf configuration file. This is usually a one-time task.

"How to Convert Printer Information For a System Running the Solaris 2.5.1 Release"

 

Convert Printer Configuration Information for a System Running an lpd-based Print Server - If your site uses lpd-based software, you convert the printer configuration information in the /etc/printcap file to the /etc/printers.conf configuration file. This is usually a one-time task.

"How to Convert Printer Information For a System Running an lpd-based Print Server"

Converting Existing Printer Configuration Information

Existing printer configuration information is automatically converted when installing or upgrading to the Solaris 9 release. This section explains how to convert the printer configuration information for a system running SunOS 5.5.1 release or a system running a lpd-based printer server to the /etc/printers.conf printer configuration file. You'll use one of two print administration commands to automate the conversion task:

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 print clients or by loading it into the NIS or NIS+ name service. This is a good way to initially enable all the new print clients access to the existing printers at your site.


Caution - If you are using the NIS or NIS+ name service to configure printer information, do not use a /etc/printers.conf file on your print clients. A print client uses the /etc/printers.conf file first to locate a printer; however, the /etc/printers.conf file might 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 print clients when you want them to use NIS or NIS+ for printer information.


How to Convert Printer Information For a System Running the Solaris 2.5.1 Release

  1. Log in as superuser on the system running the Solaris 9 release.

  2. Convert the printer configuration information in the system's /etc/lp/printers directory to the /etc/printers.conf file.

    # /usr/lib/print/conv_lp

How to Convert Printer Information For a System Running an lpd-based Print Server

  1. Copy the /etc/printcap file from a system running an lpd-based print server to a system running the Solaris 9 release.

  2. Log in as superuser on the system running the Solaris 9 release where you copied the /etc/printcap file.

  3. Convert the printer configuration information in the /etc/printcap file to the /etc/printers.conf file.

    # /usr/lib/print/conv_lpd
 
 
 
  Previous   Contents   Next