Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Servers and Workstations: Managing Systems and Workgroups > Chapter 4 Configuring a Workgroup

Configuring Printers for a Workgroup

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section deals with configuring printers according to two methods: the traditional UNIX LP spooler and the HP Distributed Print Server (HPDPS).

For conceptual information about print-management topics, see “Planning your Printer Configuration”.

For procedures on maintaining your printer environment, see “Managing Printers”.

Configuring Printers to Use the LP Spooler

This section provides information on performing the following procedures:

Initializing the LP Spooler

Before you can use the LP spooler, you must initialize it.

Using SAM

If you use SAM to add a printer, SAM will prompt you to initialize the LP spooler.

Using HP-UX Commands

You can use HP-UX commands to initialize the LP spooler by following these steps:

  1. Add at least one printer to the LP spooler.

    See “Adding a Local Printer to the LP Spooler ”.

  2. Tell the LP spooler to accept print requests for this printer.

    Using the plumbing system analogy in Figure 2-2 “Line Printer Spooler “Plumbing” Diagram ”, this is equivalent to opening the accept/reject valves above the holding tanks. See also“Controlling the Flow of Print Requests”.

  3. Tell the LP spooler to enable the printer for printing.

    In the plumbing system analogy, this is equivalent to opening the enable/disable valves below the holding tanks. See “Enabling or Disabling a Printer”.

  4. Turn on the LP spooler.

    See “Stopping and Restarting the LP Spooler ”.

Adding a Local Printer to the LP Spooler

NOTE: Do not confuse adding a printer to the LP spooler with adding a printer to your system: adding a printer to the LP spooler involves configuring the LP spooler, whereas adding a printer to your system involves connecting the printer to your computer and configuring the needed drivers in the kernel. For information on the latter, refer to Configuring HP-UX for Peripherals.
Using SAM

The easiest way to add a local printer to the LP spooler is to run SAM. SAM will also do some of the CDE configuration (if CDE is being used) and some of the SharedPrint configuration (if you are using a SharedPrint printer model).

Using HP-UX Commands
  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Add the printer to the LP spooler. For example:

    /usr/sbin/lpadmin -plocal_printer -v/dev/lp -mHP_model -g7

    See lpadmin(1M) for details on the options. See “Printer Model Files” for choices for the -m option.

  4. If the printer being added will be the default printer, execute the following:

    /usr/sbin/lpadmin -dlocal_printer

    Allow print requests to be accepted for the newly added printer. For example:

    /usr/sbin/accept local_printer

    See “Controlling the Flow of Print Requests” for information on accept.

  5. Enable the newly added printer to process print requests. For example:

    /usr/bin/enable local_printer

    See “Enabling or Disabling a Printer” for details.

  6. Restart the LP spooler:

    /usr/sbin/lpsched
  7. Test the printer using the LP spooler, then check the LP spooler’s status.
    For example:

    lp -dlocal_printer /etc/passwd
    lpstat -t

Adding a Remote Printer to the LP Spooler

To familiarize yourself with remote spooling concepts, see “Remote Spooling”.

The easiest way to add a printer to a remote system is to run SAM. If you elect to use HP-UX commands, review the SAM procedure, Step 4, as this information will also be required when performing the task manually.

Using SAM
NOTE: SAM does not verify that an actual printer exists on a remote system. Be sure the printer is installed and configured, and if necessary, use SAM to configure it on the remote system before adding it as a remote printer.
  1. Invoke SAM, as superuser.

  2. Select Printers and Plotters.

  3. From the Action pulldown menu, choose Add Remote Printer/Plotter.

  4. Provide information for the following data fields:

    • Printer Name

    • Remote System Name

    • Remote Printer Name

    • Whether Remote Printer is on a BSD system

    • Remote Cancel Name

    • Remote Status Name

    • Default Request Priority

    • Whether to Allow Anyone to Cancel a Request

    • Whether to Make this Printer the Default Destination

  5. When all fields are filled in, select OK. SAM returns with troubleshooting information, in case configuration was unsuccessful. Most likely problems will be related to the remote system configuration. Check as follows:

    1. Edit /etc/services (on remote system), and if necessary, uncomment the line beginning with printer by removing the #.

    2. Ensure no systems are restricted from access by /var/adm/inetd.sec.

    3. Make sure rlpdaemon is running.

Using HP-UX Commands
  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Add the remote printer.

    • If the remote printer is on an HP-UX system, enter:

      lpadmin -plocal_printer -v /dev/null -mrmodel \
        -ormremote_machine -orpremote_dest -ocmrcmodel \
        -osmrsmodel

    • If the remote printer is not on an HP-UX system, enter:

      lpadmin -plocal_printer -v /dev/null -mrmodel \
        -ormremote_machine -orpremote_dest -ocmrcmodel \
        -osmrsmodel -ob3

    See lpadmin(1M) for details on the options. Also see “Printer Model Files” for information to provide to the -m option.

  4. Allow print requests to be accepted for the newly added remote printer. For example:

    /usr/sbin/accept local_printer

  5. If the printer being added will be the default printer, execute the following:

    /usr/sbin/lpadmin -dlocal_printer

  6. Enable the newly added printer to process print requests. For example:

    /usr/bin/enable local_printer

  7. Restart the LP spooler to process print requests.

    /usr/sbin/lpsched

  8. Send a sample print job to the printer.

    • If it prints, the remote printing daemon (rlpdaemon) is active on the system and your task is completed.

    • If your print job does not print, the remote printing daemon (rlpdaemon) is not active yet on the remote machine. Activate the rlpdaemon on the host system where the remote printer resides, as follows in the next step.

  9. Examine the file /etc/inetd.conf and look for the following line:

    # printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i

    If a # sign appears at the beginning of the line, the rlpdaemon line is commented out, preventing the printer from printing remotely.

    Edit the file /etc/inetd.conf to remove the # sign. Save the file.

  10. Check /etc/services and look for:

    # printer 515/tcp spooler #remote print spooling

    If a # sign appears at the beginning of the line, the service is commented out, preventing the remote print spooler from serving the printer.

    Edit the file to remove the # sign in the first column. Save the file.

  11. Reconfigure the Internet daemon inetd, forcing it to reread the /etc/inetd.conf file. Invoke the following command:

    /usr/sbin/inetd -c

    Also, check entries in /var/adm/inetd.sec that restrict which systems can send remote print requests.

  12. Test the printer using the LP spooler, then check the LP spooler’s status.
    For example:

    lp -dlocal_printer /etc/passwd
    lpstat -t

Adding a Network-Based Printer

Using SAM

You can use SAM to add a network-based printer that uses the HP JetDirect Network Interface. The HP JetDirect software must be installed on your system and you must be prepared to provide SAM with the following:

  • the printer’s node name (the name associated with an Internet address)

  • the local name that the LP spooler will use to refer to the printer.

With HP JetDirect, printers can connect directly to the network. The printer uses a LAN connection and the HP JetDirect software transmits prints requests. For more information, see HP JetDirect Network Interface Configuration Guide.

Using HP-UX Commands

If you do not use SAM, follow the instructions shipped with your printer or the network interface card for the printer.

Creating a Printer Class

For conceptual information, read “Printer Class”.

You can use SAM to add a printer to a printer class when the printer is being added to the spooler; otherwise, you must use HP-UX commands. To use HP-UX commands, follow these steps after several printers have been added to the LP spooler:

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Create the printer class, specifying the printer you want to add to the class of printers.

    For example, to add a printer named laser1 to the class of printers named laser, enter:

    /usr/sbin/lpadmin -plaser1 -claser

    Only one printer can be added to a class at a time. If you have more than one printer to add, repeat this command.

  4. Allow print requests to be accepted for the newly added printer class.
    For example:

    /usr/sbin/accept laser
  5. Restart the LP spooler:

    /usr/sbin/lpsched

Removing a Printer from the LP Spooler

Using SAM
  1. Invoke SAM as superuser.

  2. Select Printers and Plotters.

  3. Highlight the printer or plotter you are removing.

  4. From the Actions pull-down menu, choose Remove ...

NOTE: SAM asks for confirmation before removing the printer from the LP spooler. If print jobs remain in the printer’s queue or if the printer is the system default destination, SAM notifies you. If you choose to remove a printer with jobs in its queue, SAM cancels them.
Using HP-UX commands
  1. Ensure that you have superuser capabilities.

  2. (Optional): Notify users that you are removing the printer from the system.

  3. Remove the printer from the configuration file of any software application through which the device is accessed. (Refer to the documentation accompanying the software application for instructions.)

  4. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  5. (Optional): Deny any further print requests for the printer. For example:

    /usr/sbin/reject -r"Use alternate printer." laser1

    By doing this step, you can be assured that no new jobs will appear before you remove the printer.

    Users will see the message “Use alternate printer” when they direct requests to a rejected destination if the printer has not been removed. Once the printer has been removed and users try to send a request, they will see the message “Destination printer_name non-existent”. See “Controlling the Flow of Print Requests”.

  6. (Optional): Determine if there are any jobs in the printer’s queue. For example:

    /usr/bin/lpstat -o laser1

  7. (Optional): Disable the printer to be removed. For example:

    /usr/bin/disable -r"Printer laser1 is disabled." laser1

    You would issue the above disable command if there are jobs in the printer’s queue and you do not want to wait for them to print before removing the printer. Issuing the disable command shuts the printer down in an orderly manner.

    For more information, see “Enabling or Disabling a Printer”. Note that you can also specify the -c option to the disable command to cancel all print requests for the printer.

  8. (Optional): If there are no jobs in the printer’s queue, go on to Step 9. If there are jobs, decide whether to move all pending print requests in the request directory to another printer request directory or to cancel any requests. For example, to move print requests:

    /usr/sbin/lpmove laser1 laser2

    To cancel any requests:

    /usr/bin/cancel laser1

  9. Remove the printer from the LP spooler. For example:

    /usr/sbin/lpadmin -xlaser1

  10. Restart the LP spooler:

    /usr/sbin/lpsched

    See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

Removing a Printer from a Printer Class

Read “Printer Class” to familiarize yourself with this concept.

NOTE: You cannot use SAM to remove a printer from a class.
Using HP-UX commands
  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Remove the printer from the class. For example:

    /usr/sbin/lpadmin -plaser1 -rclass

  4. Restart the LP spooler:

    /usr/sbin/lpsched

See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

Removing a Printer Class

See “Printer Class” to familiarize yourself with this concept.

NOTE: You cannot use SAM to remove a printer class.
Using HP-UX commands
  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. (Optional): Deny any further print requests for the printer. For example:

    /usr/sbin/reject -r"Use alternate printer." laser1

  4. (Optional): Determine if there are any jobs in the printer’s queue. For example:

    /usr/bin/lpstat -o laser1

  5. (Optional): Move all pending print requests in the request directory for the printer class to another printer or printer class. For example:

    /usr/sbin/lpmove laser1 laser2

  6. Remove the printer class. For example:

    /usr/sbin/lpadmin -xlaser

  7. Restart the LP spooler:

    /usr/sbin/lpsched

    See lpshut(1M), reject(1M), lpmove(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

NOTE: When you remove a printer class, the printers in the class are not removed — you may still use them as individual printers. If you remove all printers from a class, that printer class is automatically removed.

Configuring Printers to Use HPDPS

IMPORTANT: HPDPS is not supported on versions of HP-UX after HP-UX 11i Version 1.0.

This section gives the following procedures for setting up and activating the HP Distributed Print Services:

For conceptual information about HPDPS, read “HP Distributed Print Service (HPDPS)”.

Implementing HPDPS

  1. Install the requisite file sets, using swinstall. For more information, see “Determining Filesets to Install and Where to Install Them”.

    NOTE: If you plan to use SAM to implement and administer HPDPS, be sure to install an HPDPS client on the system from which you will be running SAM.
  2. The easiest way to implement HPDPS is to use SAM to create the HPDPS objects. Here is how to do so for an HPDPS Basic Environment on a system for which the LP Spooler is already configured:

    1. As superuser, execute sam.

    2. Select Printers and Plotters. You will see two choices HP Distributed Print Services and LP Spooler.

      Before entering the HP Distributed Print Services area, select LP Spooler. Record information about the existing configuration that you will need to provide it to HPDPS:

      • Names of printers

      • Types of connection (local, network, or remote) and any pertinent additional information, such as IP address

      • Host system to which printer is configured

    3. Go up to the previous SAM level, and then select HP Distributed Print Services to create HPDPS objects.

      You can add the HPDPS objects in any order. SAM will prompt you until you have added all the components you need for a Basic Environment. (This procedure documents one order, but not the only order.)

    4. To create HPDPS objects, select the Physical Printers icon. Once the screen changes to the Physical Printers area, pull down the Actions menu to choose the kind of physical printer (for example, an HP-UX LP printer) to add. SAM responds with a dialogue box to add access to an HP-UX LP Spooler Printer by asking for the following information:

      • Location of HPDPS printer, supervisor, and supervisor host

      • LP destination, LP spooler host, and IP address, to record where the HPDPS physical printer will send its print jobs

        If an HPDPS supervisor does not exist yet on your system, SAM prompts you through a dialogue box to create one. If one does exist on the system, SAM displays its information.

      When you enter OK, SAM displays another dialogue box for more information about the physical printer itself:

      • Printer name

      • Printer model

      • Print queue

        If a print queue exists, SAM displays the print queue information; else, SAM prompts you for print queue name, spooler, and spooler host. You can also set job scheduling method (to priority-fifo or fifo) by choosing print queue options.

      When you enter OK, if no Logical Printer object exists on your system, SAM prompts you to create it with another dialogue box. Alternatively, you can select Logical Printers from the List pull-down menu. Then, from the Actions pull-down menu, choose Add a Logical Printer. SAM prompts you for Logical Printer name, print queue, and displays information about the print queue, including spooler, spooler host, and physical printer(s).

      As you create the HPDPS objects (physical printer, logical printer, print queue, spooler, and supervisor), SAM report the results and prompts you to continue creating the objects until you have created a minimal set.

      Exit SAM.

    5. To use HPDPS, you have to activate the spooler and supervisor daemons. The simplest way to do so is to execute the following HP-UX commands:

      /opt/pd/bin/pdstartspl
      /opt/pd/bin/pdstartsuv

  3. Verify your HPDPS configuration by sending a file to an HPDPS-configured logical printer. For example,

    pdpr -p Logical1 /etc/passwd

Automatically Starting HPDPS

Once you have implemented HPDPS on your system(s), you will want to edit the start-up configuration file, /etc/rc.config.d/pd, to start the HPDPS daemons at system boot-up.

For detailed information on doing so, see “Automatically Starting HPDPS,” in Chapter 4 of the HP Distributed Print Service Administration Guide.

Modifying Users’ Environments to Use HPDPS

Enabling Users to Access HPDPS Printers

During the installation process, HPDPS adds /opt/pd/bin to the HP-UX PATH environment variable. For users to access HPDPS commands, they should have the same path set in their environment.

You (or your users) can add the path to the HPDPS executables to their /etc/PATH file by issuing the following at prompt:

PATH=$PATH:/opt/pd/bin

Defining a Default Logical Printer

For users’ ease of use, set the PDPRINTER environment variable to designate a default logical printer.

For example, to set the value of PDPRINTER to laserjet1, edit the systemwide /etc/profile file and add the line:

export PRPRINTER=laserjet1

Users can also add the same line to their .profile files to set a default logical printer.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997-2006 Hewlett-Packard Development Company, L.P.