Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpadmin(1M) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

accept(1M)

enable(1)

lp(1)

lpsched(1M)

lpstat(1)

lpd(1M)

printcap(5)

nroff(1)

lpadmin(1M)

NAME

lpadmin − configure the LP spooling system

SYNOPSIS

/usr/lib/lpadmin −p printer [options]
/usr/lib/lpadmin −x dest
/usr/lib/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 may not be used when the LP scheduler, lpsched(1M), is running, except where noted below. 

Exactly 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(1M) 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 below. 

−BSD configures printer P as a BSD 4.2 printer.  A BSD printer will examine /etc/printcap for its configuration.  The options veihl are not necessary or allowed.  If the printer is supported by roff(1), use the -m option with the argument BSD.printer, where printer is the appropriate model interface.  See printcap(5) for further details. 

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

−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(1M), 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, root. 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. 

Restrictions.

When creating a new printer, the −v option (execpt for BSD printers) 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(1M) 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 root & bin, or 664 permission if owned by bin & 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.  Options:

−p Pass output through pr(1) prior to printing. 

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

−12 12-pitch (10-pitch is the default)

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

−c compressed print

−e expanded print

prx Printronix P300 or P600 printer using XON/XOFF protocol at 1200 baud. 

imagen Imagen 8 ppm laser printer.  Options:

−D Add this document control parameter to the document control header.  Document control parameters control the format of the document, the job header, and page layout.  The most common document control parameters are:

−o−Dformsperpage 2
prints two pages per page of output

−o−Dformwidth #
sets the width of the output to # characters.  If setting width greater than 80 use 132, to force landscape mode.

−o−Djobheader off
specfies that no banner page should be printed

−o−Dleftmargin #
sets the leftmargin # spaces from the left.

−o−Doutlines on
puts borders around the output

−o−Dpagecollation on
pages from multiple copies of output are assembled in correct order

−o−Dpagereversal on
reverses the order of pages printed
Other document control parameters are available. The "Imagestation Users Guide" can be ordered from Imagen Corp. for more detailed information.

−Llanguage
This specifies the language of the spooled document. The default language is printer, which is used to print ascii files.  The dimp program (used by iroff(1)) creates spool files in the language impress. 

−sl This overrides printing security labels on the top and bottom of every page of output.  This option is only meaningful with CX/SX configured to B1 security, and its use is audited. 

laser Interface for a laser printer without special functions and protocol.  Options:

−p Pass output through pr(1) prior to printing. 

−sl This overrides printing security labels on the top and bottom of every page of output.  This option is only meaningful with CX/SX configured to B1 security, and its use is audited. 

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\f1  −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\f1  −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). 

6.  A BSD 4.2 printer may be configured by:

lpadmin -pprx  −BSD

SECURITY FEATURES

The following security features are in effect on systems running CX/SX configured to B1 security. 

Local printer devices must be given clearances with the mkdevclr(1MS) command prior to defining them with lpadmin.  All printers in a single class must be given the same clearances. 

Remote printer devices are assumed to have clearances defined on the remote system. 

FILES

/usr/spool/lp/∗

SEE ALSO

accept(1M), enable(1), lp(1), lpsched(1M), lpstat(1), lpd(1M), printcap(5), nroff(1). 

CX/UX Administrator’s Reference

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026