*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> lpadmin (1m)              
Title
Content
Arch
Section
 

Contents


 lpadmin(1M)                                                     lpadmin(1M)




 NAME    [Toc]    [Back]
      lpadmin - configure the LP spooling system

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

      /usr/sbin/lpadmin -xdest

      /usr/sbin/lpadmin -d[dest]

 DESCRIPTION    [Toc]    [Back]
      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 11i Version 2: Sep 2004






 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.

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

           -ob3              Uses three-digit request numbers associated
                             with the printer directory.  Use this option
                             while configuring remote printer queues to BSD
                             systems.

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

           -ormmachine       The name of the remote machine is machine.

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



 Hewlett-Packard Company            - 2 -      HP-UX 11i Version 2: Sep 2004






 lpadmin(1M)                                                     lpadmin(1M)




           -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.

           -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    [Toc]    [Back]
      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).

      For a remote printer, only one of -oci or -ocm can be specified.  If
      neither of them is specified, the default remote cancel model
      /usr/lib/lp/cmodel/rcmodel is used.  Similarly, only one of -osi or
      -osm can be specified.  If neither of them is specified, the default
      remote status model /usr/lib/lp/smodel/rsmodel is used.

      All local printers use four-digit request numbers.  All remote
      printers use three-digit request numbers for contact with BSD systems.

    Models    [Toc]    [Back]
      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



 Hewlett-Packard Company            - 3 -      HP-UX 11i Version 2: Sep 2004






 lpadmin(1M)                                                     lpadmin(1M)




      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:

           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 return a error value.
      This will make lpsched(1M) 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    [Toc]    [Back]
    Environment Variables
      LANG determines the language in which messages are displayed.





 Hewlett-Packard Company            - 4 -      HP-UX 11i Version 2: Sep 2004






 lpadmin(1M)                                                     lpadmin(1M)




      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    [Toc]    [Back]
      Assuming an existing Hewlett-Packard laserjet printer named lp1, it
      will use the laserjet model interface through /dev/lp after the
      command:

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

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

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

      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 remote system name system2 and the remote printer lp are used.

      The following command performs the same operation as above.

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

      Here the default remote cancel model rcmodel and the default remote
      status model rsmodel are used.

 WARNINGS    [Toc]    [Back]
      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    [Toc]    [Back]
      /var/spool/lp/*



 Hewlett-Packard Company            - 5 -      HP-UX 11i Version 2: Sep 2004






 lpadmin(1M)                                                     lpadmin(1M)




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

 SEE ALSO    [Toc]    [Back]
      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            - 6 -      HP-UX 11i Version 2: Sep 2004
[ Back ]
      
      
 Similar pages
Name OS Title
setnetlp HP-UX configure the LP spooling system for lpd or ftp network printers
rmprinter IRIX remove a printer from the System V spooling system
gpsinterface IRIX Generic PostScript model for System V spooling.
preset IRIX reset the lp spooling system to a pristine state by deleting printers
it Tru64 configure a system after installation
crashconf HP-UX configure system crash dumps
crashconf HP-UX configure system crash dumps
paperconfig Linux configure the system default paper size
create_fastlinks HP-UX configure the system to use fast symbolic links
mount_mfs FreeBSD configure and mount an in-memory file system using the md(4) driver
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service