


      LPADMIN(1)                  (UNIX 5.2)                 LPADMIN(1)



      NAME
           lpadmin - configure the LP spooling system

      SYNTAX
           /usr/lib/lpadmin -pprinter [options]
           /usr/lib/lpadmin -xdest
           /usr/lib/lpadmin -d[dest]

      DESCRIPTION
           Lpadmin is part of the LP Spooling System.  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 may not be used when the LP
           scheduler, lpsched(1), is running, except where noted below.

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

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

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

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

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

           -cclass        inserts printer P into the specified class.
                          Class will be created if it does not already
                          exist.

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

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



      Page 1                                          (73 A2 02MT REV1)






      LPADMIN(1)                  (UNIX 5.2)                 LPADMIN(1)



           -iinterface    establishes a new interface program for P.
                          Interface is the pathname of the new program.

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

           -mmodel        selects a model interface program for 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 P is the last member of the class, then
                          the class will be 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, then
                          lpadmin may be used while the scheduler is
                          running.



























      Page 2                                          (73 A2 02MT REV1)






      LPADMIN(1)                  (UNIX 5.2)                 LPADMIN(1)



         Restrictions.
           When creating a new printer, the -v option and one of the
           -e, -i or -m options must be supplied.  Only one of the -e,
           -i or -m options may be supplied.  The -h and -l keyletters
           are mutually exclusive.  Printer and class names may be no
           longer than 14 characters and must consist entirely of the
           characters A-Z, a-z, 0-9 and _ (underscore).

         Models.
           Model printer interface programs are supplied with the LP
           software.  They are shell procedures which interface between
           lpsched (1) and devices.  All models reside in the directory
           /usr/spool/lp/model and may be used as is with lpadmin -m.
           Models should have 644 permission if owned by user lp &
           group bin, or 664 permission if owned by user bin & group
           bin.  Alternatively, LP administrators may modify copies of
           models and then use lpadmin -i to associate them with
           printers.  The following list describes the models and lists
           the options which they may be given on the lp command line
           using the -o keyletter:

           dumb    interface for a line printer without special
                   functions and protocol.  Form feeds are assumed.
                   This is a good model to copy and modify for printers
                   which do not have models.

           1640    DIABLO 1640 terminal running at 1200 baud, using
                   XON/XOFF protocol.  Options:

                   -12  12-pitch (10-pitch is the default)
                   -f   do not use the 450(1) filter.  The output has
                        been pre-processed by either 450(1) or the
                        nroff (1) 450 driving table.

           hp      Hewlett-Packard 2631A line printer at 2400 baud.
                   Options:

                   -c         compressed print
                   -e         expanded print
                   -n         normal print
                   -b baud    baud rate.  The default is 2400 baud.

           prx     Printronix P300 or P600 printer using XON/XOFF
                   protocol at 1200 baud.  This model interface assumes
                   the existence of a filter program /usr/lib/prx .
                   The filter program accepts one argument, the baud
                   rate of the serial line; if no parameter is
                   supplied, 1200 baud is assumed.  The program also
                   expands tabs to a suitable number of spaces
                   (assuming tab stops every 8 columns), limits output
                   lines to 132 characters, and simulates bold by
                   underlining.  The printer cannot backspace,



      Page 3                                          (73 A2 02MT REV1)






      LPADMIN(1)                  (UNIX 5.2)                 LPADMIN(1)



                   therefore underlining is done by printing text from
                   one buffer, then doing a return (but no linefeed)
                   and printing underlines at proper character
                   positions.

           pprx    Printronix P300 or P600 printer connected on a
                   parallel interface.  This model interface assumes
                   the existence of a filter program /usr/lib/pprx .
                   The filter program expands tabs to a suitable number
                   of spaces (assuming tab stops every 8 columns),
                   limits output lines to 132 characters, and simulates
                   bold by underlining.  The printer cannot backspace,
                   therefore underlining is done by printing text from
                   one buffer, then doing a return (but no linefeed)
                   and printing underlines at proper character
                   positions.

           plp     Generic line printer device connected on a parallel
                   interface.  This model interface assumes the
                   existence of a filter program /usr/lib/plp .  The
                   filter program expands tabs to a suitable number of
                   spaces (assuming tab stops every 8 columns), and
                   limits output lines to 132 characters.  Backspaces
                   are handled by keeping each character following a
                   backspace in a separate buffer.  When the end of
                   line is reached, the first buffer is printed with a
                   following return (but no linefeed), then the second
                   buffer is printed.  This overstrikes the first
                   buffer with the second.


























      Page 4                                          (73 A2 02MT REV1)






      LPADMIN(1)                  (UNIX 5.2)                 LPADMIN(1)



           machine:printer
                   For printers connected to remote machines on a local
                   area network.  The LP administrator must modify this
                   model by renaming it to the name of the remote
                   machine, followed by a colon, followed by the name
                   of the printer on the remote machine.  For instance,
                   the model name for a printer lp on a machine named
                   alborz would be alborz:lp.  This interface program
                   will disable the printer if the rsh command used to
                   execute the lp spooler on the remote machine fails.

      EXAMPLES
           1.  Assuming there is an existing Hewlett-Packard 2631A line
               printer named hp2, it will use the hp model interface
               after the command:

                     /usr/lib/lpadmin  -php2  -mhp

           2.  To obtain compressed print on hp2, use the command:

                     lp  -dhp2  -o-c  files

           3.  A DIABLO 1640 printer called st1 can be added to the LP
               configuration with the command:

                     /usr/lib/lpadmin  -pst1  -v/dev/tty20  -m1640

           4.  An nroff (1) document may be printed on st1 in any of
               the following ways:

                     nroff  -T450  files  |  lp  -dst1  -of
                     nroff  -T450-12  files  |  lp  -dst1  -of
                     nroff  -T37  files  |  col  |  lp  -dst1

           5.  The following command prints the password file on st1 in
               12-pitch:

                     lp  -dst1  -o12  /etc/passwd

               NOTE: the -12 option to the 1640 model should never be
               used in conjunction with nroff(1).

      FILES
           /usr/spool/lp/* , /usr/lib/hp2631a, /usr/lib/prx,
           /usr/lib/pprx, /usr/lib/plp.

      SEE ALSO
           accept(1), enable(1), lp(1), lpsched(1), lpstat(1),
           nroff(1), rsh(1).






      Page 5                                          (73 A2 02MT REV1)



