unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 lpadmin(1M)							 lpadmin(1M)




 NAME
      lpadmin - configure the LP spooling system

 SYNOPSIS
      /usr/sbin/lpadmin -pprinter [options]

      /usr/sbin/lpadmin -xdest

      /usr/sbin/lpadmin -d[dest]

 DESCRIPTION
      lpadmin configures LP spooling systems to describe printers, classes
      and devices.  It is used to add and remove destinations, change
      membership in classes, change devices for printers, change printer
      interface programs, and to change the system default destination.
      lpadmin cannot be used when the LP scheduler, lpsched(1M), is running,
      except where noted below.

      Exactly one of the -p, -x or -d options must be present for every
      legal invocation of lpadmin.

	   -pprinter	     Names a printer to which all of the options
			     below refer.  If printer does not exist, it
			     will be created.

	   -xdest	     Removes destination dest from the LP system.
			     If dest is a printer and is the only member of
			     a class, the class is deleted, too.  No other
			     options are allowed with -x.

	   -d[dest]	     Makes existing destination dest the new system
			     default destination.  If dest is not supplied,
			     there is no system default destination.  This
			     option can be used when lpsched(1M) is running.
			     No other options are allowed with -d.

      The following options are only useful with -p and can appear in any
      order.  For ease of discussion, the printer is referred to below as
      printer P.

	   -cclass	     Inserts printer P into the specified class.
			     class is created if it does not already exist.

	   -eprinter	     Copies an existing printer's interface program
			     to be the new interface program for printer P.

	   -gpriority	     Sets the default priority for printer P
			     associated with lp(1).  If omitted, the default
			     priority is set to 0.





 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 lpadmin(1M)							 lpadmin(1M)




	   -h		     Indicates that the device associated with
			     printer P is hardwired.  This option is assumed
			     when creating a new printer unless the -l
			     option is specified.

	   -iinterface	     Establishes a new interface program for printer
			     P.	 interface is the pathname of the new
			     program.

	   -l		     Indicates that the device associated with
			     printer P is a login terminal.  The LP
			     scheduler (see lpsched(1M)) disables all login
			     terminals automatically each time it is
			     started.  Before re-enabling printer P, its
			     current device should be established using
			     lpadmin.

	   -mmodel	     Selects a model interface program for printer
			     P.	 model is one of the model interface names
			     supplied with the LP software (see Models
			     below).

	   -rclass	     Removes printer P from the specified class.  If
			     printer P is the last member of the class, the
			     class is removed.

	   -vdevice	     Associates a new device with printer P.  device
			     is the pathname of a file that is writable by
			     the LP administrator lp.  Note that there is
			     nothing to stop an administrator from
			     associating the same device with more than one
			     printer.  If only the -p and -v options are
			     supplied, lpadmin can be used while the
			     scheduler is running.

      The following options are only useful with -p and can appear in any
      order.  They are provided with systems that provide remote spooling.

	   -ob3		     Uses three-digit request numbers associated
			     with the printer directory.  This is for
			     contact with BSD systems.	The default is to
			     not use three-digit request numbers.

	   -ociremcancel     Specifies that the local command remcancel is
			     used to cancel requests to remote printers.  To
			     ensure that the correct command is used,
			     specify the full path name.

	   -ocmremcancel     Specifies that the local model remcancel is
			     used to cancel requests to remote printers.




 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 lpadmin(1M)							 lpadmin(1M)




	   -ormmachine	     The name of the remote machine is machine.

	   -orpprinter	     The name of the printer to use on the remote
			     machine is printer.

	   -orc		     Restricts users to canceling only their own
			     requests.	Default is to not restrict the
			     cancel command.

	   -osiremstatus     Specifies that the command remstatus is used to
			     obtain the status of requests to remote
			     printers.	To ensure that the correct command
			     is used, specify the full path name.

	   -osmremstatus     Specifies that the	 model remstatus is used to
			     obtain the status of requests to remote
			     printers.

    Restrictions
      When creating a new printer, the -v option and one of the -e, -i , or
      -m options must be specified.  Only one of the -e, -i or -m options
      can be specified.	 The -h and -l key letters are mutually exclusive.
      Printer and class names must not exceed 14 characters and must consist
      entirely of the characters A-Z, a-z, 0-9 and _ (underscore).

    Models
      Model interface programs are supplied with the LP software.  They are
      shell procedures, C programs, or other executable programs that
      interface between lpsched(1M) and devices.  All printer models reside
      in directory /usr/lib/lp/model and can be used without modification
      with lpadmin -m.	All cancel models reside in directory
      /usr/lib/lp/cmodel and can be used without modification with lpadmin
      -ocm.  All status models reside in directory /usr/lib/lp/smodel and
      can be used without modification with lpadmin -osm.  Models should
      have 644 permission if owned by lp and bin, or 664 permission if owned
      by bin and bin.  Model file names must not exceed 14 characters.
      Alternatively, LP administrators can modify copies of models then use
      lpadmin -m to associate them with printers.

      The LP model interface program does the actual printing on the device
      that is currently associated with the printer.  The LP spooler sets
      standard input to /dev/null and standard output and standard error
      output to the device specified in the -v option of lpadmin.  The
      interface program is then invoked for printer P from the directory
      /etc/lp as follows:

	   interface/P id user title copies options file ...

      where arguments are as follows:





 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000






 lpadmin(1M)							 lpadmin(1M)




	   id		  request id returned by lp(1).

	   user		  login name of the user who made the request.

	   title	  optional title specified with the -t option of
			  lp(1).

	   copies	  number of copies to be printed.

	   options	  blank-separated list of class-dependent or
			  printer-dependent options specified with the -o
			  option of lp(1).  Options from a BSD system have
			  the character sequence BSD attached to the
			  beginning of the option (for example, BSDl).

	   file		  full pathname of the file to be printed.

      Given the command line arguments and the output directed to the
      device, interface programs can format their output in any way they
      choose.

      When printing is completed, it is the responsibility of the interface
      program to exit with a code indicative of the success of the print
      job.  Only return values of 0 indicating that the job completed
      successfully, or values of positive 1 through 127 indicating that some
      error was encountered that does not affect future print jobs should be
      used.  Negative values and positive values greater than 127 are
      reserved for system use and should not be used by interface programs.
      lpsched(1M) notifies users by mail when there is an error in printing
      the request.  If problems are detected that are likely to affect
      future print jobs, the interface program should disable the printer so
      that other pending print requests are not lost.

      The cancel and status model interface programs perform the actual
      communication with the remote system to cancel requests or get the
      status of requests.  See rcancel(1M) and rlpstat(1M) for command line
      arguments.

 EXTERNAL INFLUENCES
    Environment Variables
      LANG determines the language in which messages are displayed.

      If LANG is not specified or is set to the empty string, a default of
      "C" (see lang(5)) is used instead of LANG.

      If any internationalization variable contains an invalid setting,
      lpadmin behaves as if all internationalization variables are set to
      "C" (see environ(5)).

 EXAMPLES




 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000






 lpadmin(1M)							 lpadmin(1M)




      Assuming an existing Hewlett-Packard HP2934A line printer named lp1,
      it will use the hp2934a model interface through /dev/lp after the
      command:

	   /usr/sbin/lpadmin -plp1 -mhp2934a -v/dev/lp

      Assuming a printer lp on a remote system system2, the command:

	   /usr/sbin/lpadmin -plp3 -v/dev/null -mrmodel -ocmrcmodel
	   -osmrsmodel -ob3 -ormsystem2 -orplp -v/dev/null

      causes the spool system to use the local line printer lp3 and the
      model rmodel.  The spool system also uses the model rcmodel to cancel
      remote requests and rsmodel to get status from system2.  In addition,
      the three-digit sequence numbers, the remote system name system2 and
      the remote printer lp are used.

 WARNINGS
      When installing remote printers, use the option -ocmrcmodel instead of
      -oci/usr/sbin/rcancel to specify the method used to cancel remote
      requests.	 The option -osmrsmodel should be used instead of
      -osi/usr/sbin/rlpstat to specify the method used for displaying remote
      status.

      classes must not include remote printers.	 HP-UX systems do not have
      the ability to distribute print jobs in this way.	 Printing to a class
      of printers on a remote system (systemB for example) must be
      accomplished by creating the class on the remote system, then
      identifying that class by using a command resembling the following
      (though you might have to change some of the specific values shown in
      the example):

	   lpadmin -plocal_name -ormsystemB -orpsystemB_class_name
	   -v /dev/null -mrmodel -ocmrcmodel -osmrsmodel

 FILES
      /var/spool/lp/*
      /var/adm/lp/*
      /etc/lp/*
      /usr/lib/lp/*

 SEE ALSO
      enable(1), lp(1), lpstat(1), nroff(1), accept(1M), lpana(1M),
      lpsched(1M), rcancel(1M), rlp(1M), rlpdaemon(1M), rlpstat(1M).










 Hewlett-Packard Company	    - 5 -   HP-UX Release 11i: November 2000