8960 libefi: import efichar.c for ucs2 support
[unleashed.git] / usr / src / man / man1m / lpadmin.1m
blobc509eafe2ea07eaed1f83a3880dde870c4db6547
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LPADMIN 1M "May 13, 2017"
7 .SH NAME
8 lpadmin \- configure the LP print service
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBlpadmin\fR \fB-p\fR \fIprinter\fR {\fIoptions\fR}
13 .fi
15 .LP
16 .nf
17 \fBlpadmin\fR \fB-x\fR \fIdest\fR
18 .fi
20 .LP
21 .nf
22 \fBlpadmin\fR \fB-d\fR [\fIdest\fR]
23 .fi
25 .LP
26 .nf
27 \fBlpadmin\fR \fB-S\fR \fIprint-wheel\fR \fB-T\fR [\fB-A\fR \fIalert-type\fR] [\fB-W\fR \fIminutes\fR]
28      [\fB-Q\fR \fIrequests\fR]
29 .fi
31 .SH DESCRIPTION
32 .LP
33 \fBlpadmin\fR configures the LP print service by defining printers and devices.
34 It is used to add and change printers, to remove printers from service, to set
35 or change the system default destination, to define alerts for printer faults,
36 and to mount print wheels.
37 .SH OPTIONS
38 .LP
39 The \fBlpadmin\fR command has options for:
40 .RS +4
41 .TP
42 .ie t \(bu
43 .el o
44 Adding or changing a printer
45 .RE
46 .RS +4
47 .TP
48 .ie t \(bu
49 .el o
50 Removing a printer destination
51 .RE
52 .RS +4
53 .TP
54 .ie t \(bu
55 .el o
56 Setting or changing the system default destination
57 .RE
58 .RS +4
59 .TP
60 .ie t \(bu
61 .el o
62 Setting an alert for a print wheel
63 .RE
64 .sp
65 .LP
66 The options for each of the above categories are specified in the following
67 subsections.
68 .sp
69 .LP
70 Several options support the use of lists. A list might contain, for example,
71 user names, printers, printer forms, or content types. A list of multiple items
72 can have the form of either comma-separated names or have the entire list
73 enclosed by double quotes with a space between each name. For example, both
74 lists below are acceptable:
75 .sp
76 .in +2
77 .nf
78 one,two,three
79 "one two three"
80 .fi
81 .in -2
83 .SS "Adding or Changing a Printer"
84 .LP
85 The first form of the \fBlpadmin\fR command (\fBlpadmin\fR \fB-p\fR
86 \fIprinter\fR {\fIoptions\fR}) configures a new printer or changes the
87 configuration of an existing printer. It also starts the print scheduler.
88 .sp
89 .LP
90 When creating a new printer, one of three options (\fB-v\fR, \fB-U\fR, or
91 \fB-s\fR) must be supplied. In addition, only one of the following can be
92 supplied: \fB-e\fR, \fB-i\fR, or \fB-m\fR; if none of these three options is
93 supplied, the model standard is used. The \fB-h\fR and \fB-l\fR options are
94 mutually exclusive. Printer and class names must be no longer than 14
95 characters and must consist entirely of the characters \fBA\fR-\fBZ\fR,
96 \fBa\fR-\fBz\fR, \fB0\fR-\fB9\fR, dash (\fB-\fR) and underscore (\fB_\fR). If
97 \fB-s\fR is specified, the following options are invalid: \fB-A\fR, \fB-e\fR,
98 \fB-F\fR, \fB-h\fR, \fB-i\fR, \fB-l\fR, \fB-M\fR, \fB-m\fR, \fB-o\fR, \fB-U\fR,
99 \fB-v\fR, and \fB-W\fR.
102 The following options can appear in any order.
104 .ne 2
106 \fB\fB-A\fR \fIalert-type\fR [\fB-W\fR \fIminutes\fR]\fR
108 .sp .6
109 .RS 4n
110 The \fB-A\fR option is used to define an alert that informs the administrator
111 when a printer fault is detected, and periodically thereafter, until the
112 printer fault is cleared by the administrator. The \fIalert-types\fR are:
114 .ne 2
116 \fB\fBmail\fR\fR
118 .RS 17n
119 Send the alert message using mail (see \fBmail\fR(1)) to the administrator.
123 .ne 2
125 \fB\fBwrite\fR\fR
127 .RS 17n
128 Write the message to the terminal on which the administrator is logged in. If
129 the administrator is logged in on several terminals, one is chosen arbitrarily.
133 .ne 2
135 \fB\fBquiet\fR\fR
137 .RS 17n
138 Do not send messages for the current condition. An administrator can use this
139 option to temporarily stop receiving further messages about a known problem.
140 Once the fault has been cleared and printing resumes, messages are sent again
141 when another fault occurs with the printer.
145 .ne 2
147 \fB\fBshowfault\fR\fR
149 .RS 17n
150 Attempt to execute a fault handler on each system that has a print job in the
151 queue. The fault handler is \fB/etc/lp/alerts/printer\fR. It is invoked with
152 three parameters: \fIprinter_name\fR, \fBdate\fR, \fIfile_name\fR. The
153 \fIfile_name\fR is the name of a file containing the fault message.
157 .ne 2
159 \fB\fBnone\fR\fR
161 .RS 17n
162 Do not send messages; any existing alert definition for the printer is removed.
163 No alert is sent when the printer faults until a different alert-type (except
164 \fBquiet\fR) is used.
168 .ne 2
170 \fB\fIshell-command\fR\fR
172 .RS 17n
173 Run the \fIshell-command\fR each time the alert needs to be sent. The shell
174 command should expect the message in standard input. If there are blank spaces
175 embedded in the command, enclose the command in quotes. Notice that the
176 \fBmail\fR and \fBwrite\fR values for this option are equivalent to the values
177 \fBmail\fR \fIuser-name\fR and \fBwrite\fR \fIuser-name\fR respectively, where
178 \fIuser-name\fR is the current name for the administrator. This is the login
179 name of the person submitting this command unless he or she has used the
180 \fBsu\fR command to change to another user ID. If the \fBsu\fR command has been
181 used to change the user ID, then the \fIuser-name\fR for the new ID is used.
185 .ne 2
187 \fB\fBlist\fR\fR
189 .RS 17n
190 Display the type of the alert for the printer fault. No change is made to the
191 alert.
194 When a fault occurs, the printing subsystem displays a message indicating that
195 printing for a specified printer has stopped and the reason for the stoppage.
196 The message also indicates that printing will restart in a few minutes and that
197 you can enter an \fBenable\fR command if you want to restart sooner than that.
199 Following a fault that occurs in the middle of a print job, the job is
200 reprinted from the beginning. An exception to this occurs when you enter a
201 command, such as the one shown below, that changes the page list to be printed.
203 .in +2
205 % \fB\fR\fBlp\fR\fB \fR\fB-i\fR\fB \fIrequest-id\fR \fR\fB-P\fR\fB ...\fR
207 .in -2
210 For a given print request, the presence of multiple reasons for failure
211 indicate multiple attempts at printing.
213 The \fBLP\fR print service can detect printer faults only through an adequate
214 fast filter and only when the standard interface program or a suitable
215 customized interface program is used. Furthermore, the level of recovery after
216 a fault depends on the capabilities of the filter.
218 If, instead of a single printer, the keyword \fBall\fR is displayed in an
219 alert, the alert applies to all printers.
221 If the \fB-W\fR option is not used to arrange fault alerting for \fIprinter\fR,
222 the default procedure is to mail one message to the administrator of
223 \fIprinter\fR per fault. This is equivalent to specifying \fB-W\fR \fBonce\fR
224 or \fB-W\fR \fB0\fR. If \fIminutes\fR is a number greater than zero, an alert
225 is sent at intervals specified by \fIminutes\fR.
229 .ne 2
231 \fB\fB-c\fR \fIclass\fR\fR
233 .sp .6
234 .RS 4n
235 Insert \fIprinter\fR into the specified \fIclass\fR. \fIclass\fR is created if
236 it does not already exist. This option requires the \fB-U\fR \fIdial-info\fR or
237 \fB-v\fR \fIdevice\fR options.
241 .ne 2
243 \fB\fB-D\fR \fIcomment\fR\fR
245 .sp .6
246 .RS 4n
247 Save this \fIcomment\fR for display whenever a user asks for a full description
248 of \fIprinter\fR (see \fBlpstat\fR(1)). The LP print service does not interpret
249 this comment.
253 .ne 2
255 \fB\fB-e\fR \fIprinter\fR\fR
257 .sp .6
258 .RS 4n
259 Copy the interface program of an existing \fIprinter\fR to be the interface
260 program for \fIprinter\fR. (Options \fB-i\fR and \fB-m\fR must not be specified
261 with this option.)
265 .ne 2
267 \fB\fB-f\fR \fBallow\fR:\fIform-list\fR\fR
271 \fB\fB-f\fR \fBdeny\fR:\fIform-list\fR\fR
273 .sp .6
274 .RS 4n
275 Allow or deny the forms in \fIform-list\fR to be printed on \fIprinter\fR. By
276 default no forms are allowed on a new printer.
278 For each printer, the \fBLP\fR print service keeps two lists of forms: an
279 ``allow-list'' of forms that can be used with the printer, and a ``deny-list''
280 of forms that cannot be used with the printer. With the \fB\fR\fB-f\fR\fB
281 allow\fR option, the forms listed are added to the allow-list and removed from
282 the deny-list. With the \fB-f\fR \fBdeny\fR option, the forms listed are added
283 to the deny-list and removed from the allow-list.
285 If the allow-list is not empty, only the forms in the list can be used on the
286 printer, regardless of the contents of the deny-list. If the allow-list is
287 empty, but the deny-list is not, the forms in the deny-list cannot be used with
288 the printer. All forms can be excluded from a printer by specifying \fB-f\fR
289 \fBdeny:all\fR. All forms can be used on a printer (provided the printer can
290 handle all the characteristics of each form) by specifying \fB-f\fR
291 \fBallow:all\fR.
293 The \fBLP\fR print service uses this information as a set of guidelines for
294 determining where a form can be mounted. Administrators, however, are not
295 restricted from mounting a form on any printer. If mounting a form on a
296 particular printer is in disagreement with the information in the allow-list or
297 deny-list, the administrator is warned but the mount is accepted. Nonetheless,
298 if a user attempts to issue a print or change request for a form and printer
299 combination that is in disagreement with the information, the request is
300 accepted only if the form is currently mounted on the printer. If the form is
301 later unmounted before the request can print, the request is canceled and the
302 user is notified by mail.
304 If the administrator tries to specify a form as acceptable for use on a printer
305 that does not have the capabilities needed by the form, the command is
306 rejected.
308 Notice the other use of \fB-f\fR, with the \fB-M\fR option, below.
310 The \fB-T\fR option must be invoked first with \fBlpadmin\fR to identify the
311 printer type before the \fB-f\fR option can be used.
315 .ne 2
317 \fB\fB-F\fR \fIfault-recovery\fR\fR
319 .sp .6
320 .RS 4n
321 This option specifies the recovery to be used for any print request that is
322 stopped because of a printer fault, according to the value of
323 \fIfault-recovery\fR:
325 .ne 2
327 \fB\fBcontinue\fR\fR
329 .RS 13n
330 Continue printing on the top of the page where printing stopped. This requires
331 a filter to wait for the fault to clear before automatically continuing.
335 .ne 2
337 \fB\fBbeginning\fR\fR
339 .RS 13n
340 Start printing the request again from the beginning.
344 .ne 2
346 \fB\fBwait\fR\fR
348 .RS 13n
349 Disable printing on \fIprinter\fR and wait for the administrator or a user to
350 enable printing again.
352 During the wait, the administrator or the user who submitted the stopped print
353 request can issue a change request that specifies where printing should resume.
354 (See the \fB-i\fR option of the \fBlp\fR command.) If no change request is made
355 before printing is enabled, printing resumes at the top of the page where
356 stopped, if the filter allows; otherwise, the request is printed from the
357 beginning.
363 .ne 2
365 \fB\fB-h\fR\fR
367 .sp .6
368 .RS 4n
369 Indicate that the device associated with the printer is hardwired. If neither
370 of the mutually exclusive options, \fB-h\fR and \fB-l\fR, is specified,
371 \fB-h\fR is assumed.
375 .ne 2
377 \fB\fB-i\fR \fIinterface\fR\fR
379 .sp .6
380 .RS 4n
381 Establish a new interface program for \fIprinter\fR. \fIinterface\fR is the
382 pathname of the new program. (The \fB-e\fR and \fB-m\fR options must not be
383 specified with this option.)
387 .ne 2
389 \fB\fB-I\fR \fIcontent-type-list\fR\fR
391 .sp .6
392 .RS 4n
393 Allow \fIprinter\fR to handle print requests with the content types listed in a
394 \fIcontent-type-list\fR.
396 The type \fBsimple\fR is recognized as the default content type for files in
397 the UNIX system. A \fBsimple\fR type of file is a data stream containing only
398 printable \fBASCII\fR characters and the following control characters:
403 c c c
404 l l l .
405 Control Char    Octal Value     Meaning
406 BACKSPACE       10      Move back one char, except
407                  at beginning of line
408 TAB     11      Move to next tab stop
409 LINEFEED        12      Move to beginning of
410  (newline)               next line
411 FORMFEED        14      Move to beginning of
412                  next page
413 RETURN  15      Move to beginning of
414                  current line
417 To prevent the print service from considering \fBsimple\fR a valid type for the
418 printer, specify either an explicit value (such as the printer type) in the
419 \fIcontent-type-list\fR, or an empty list. If you do want \fBsimple\fR included
420 along with other types, you must include \fBsimple\fR in the
421 \fIcontent-type-list\fR.
423 In addition to content types defined by the print administrator, the type
424 \fBPostScript\fR is recognized and supported by the Solaris print subsystem.
425 This includes filters to support \fBPostScript\fR as the printer content type.
427 The type \fBany\fR is recognized as a special content type for files. When
428 declared as the input type for a printer, it signals the print sub-system not
429 to do any filtering on the file before sending it to the printer.
431 Except for \fBsimple\fR and \fBany\fR, each \fIcontent-type\fR name is
432 determined by the administrator. If the printer type is specified by the
433 \fB-T\fR option, then the printer type is implicitly considered to be also a
434 valid content type.
438 .ne 2
440 \fB\fB-l\fR\fR
442 .sp .6
443 .RS 4n
444 Indicate that the device associated with \fIprinter\fR is a login terminal. The
445 LP scheduler (\fBlpsched\fR) disables all login terminals automatically each
446 time it is started. (The \fB-h\fR option must not be specified with this
447 option.)
451 .ne 2
453 \fB\fB-m\fR \fImodel\fR\fR
455 .sp .6
456 .RS 4n
457 Select \fImodel\fR interface program, provided with the \fBLP\fR print service,
458 for the printer. (Options \fB-e\fR and \fB-i\fR must not be specified with this
459 option.)
463 .ne 2
465 \fB\fB-M\fR \fB-f\fR \fIform-name\fR [\fB-a\fR [\fB-o\fR \fBfilebreak\fR]]
466 [\fB-t\fR \fItray-number\fR]]\fR
468 .sp .6
469 .RS 4n
470 Mount the form \fIform-name\fR on \fIprinter\fR. Print requests that need the
471 pre-printed form \fIform-name\fR is printed on \fIprinter\fR. If more than one
472 printer has the form mounted and the user has specified \fBany\fR (with the
473 \fB-d\fR option of the \fBlp\fR command) as the printer destination, then the
474 print request is printed on the one printer that also meets the other needs of
475 the request.
477 The page length and width, and character and line pitches needed by the form
478 are compared with those allowed for the printer, by checking the capabilities
479 in the \fBterminfo\fR database for the type of printer. If the form requires
480 attributes that are not available with the printer, the administrator is warned
481 but the mount is accepted. If the form lists a print wheel as mandatory, but
482 the print wheel mounted on the printer is different, the administrator is also
483 warned but the mount is accepted.
485 If the \fB-a\fR option is given, an alignment pattern is printed, preceded by
486 the same initialization of the physical printer that precedes a normal print
487 request, with one exception: no banner page is printed. Printing is assumed to
488 start at the top of the first page of the form. After the pattern is printed,
489 the administrator can adjust the mounted form in the printer and press return
490 for another alignment pattern (no initialization this time), and can continue
491 printing as many alignment patterns as desired. The administrator can quit the
492 printing of alignment patterns by typing \fBq\fR.
494 If the \fB-o\fR \fBfilebreak\fR option is given, a formfeed is inserted between
495 each copy of the alignment pattern. By default, the alignment pattern is
496 assumed to correctly fill a form, so no formfeed is added.
498 If the \fB-t\fR \fItray-number\fR option is specified, printer tray
499 \fItray-number\fR is used.
501 A form is ``unmounted'' either by mounting a new form in its place or by using
502 the \fB-f\fR \fBnone\fR option. By default, a new printer has no form mounted.
504 Notice the other use of \fB-f\fR without the \fB-M\fR option above.
508 .ne 2
510 \fB\fB-M\fR \fB-S\fR \fIprint-wheel\fR\fR
512 .sp .6
513 .RS 4n
514 Mount the \fIprint-wheel\fR on \fIprinter\fR. Print requests that need the
515 \fIprint-wheel\fR are printed on \fIprinter\fR. If more than one printer has
516 \fIprint-wheel\fR mounted and the user has specified \fBany\fR (with the
517 \fB-d\fR option of the \fBlp\fR command) as the printer destination, then the
518 print request is printed on the one printer that also meets the other needs of
519 the request.
521 If the \fIprint-wheel\fR is not listed as acceptable for the printer, the
522 administrator is warned but the mount is accepted. If the printer does not take
523 print wheels, the command is rejected.
525 A print wheel is ``unmounted'' either by mounting a new print wheel in its
526 place or by using the option \fB-S\fR \fBnone\fR. By default, a new printer has
527 no print wheel mounted.
529 Notice the other uses of the \fB-S\fR option without the \fB-M\fR option
530 described below.
534 .ne 2
536 \fB\fB-n\fR \fIppdfilename\fR\fR
538 .sp .6
539 .RS 4n
540 Specify a \fBPPD\fR file for creating and modifying printer queues.
541 \fIppdfilename\fR is the full path and file name to the \fBPPD\fR file. Used in
542 conjunction with the \fB-p\fR, \fB-d\fR, \fB-x\fR, or \fB-S\fR options.
546 .ne 2
548 \fB\fB-o\fR \fIoption\fR\fR
550 .sp .6
551 .RS 4n
552 The \fB-o\fR option defines default printer configuration values given to an
553 interface program. The default can be explicitly overwritten for individual
554 requests by the user (see \fBlp\fR(1)), or taken from a preprinted form
555 description (see \fBlpforms\fR(1M) and \fBlp\fR(1)).
557 There are several options which are predefined by the system. In addition, any
558 number of key-value pairs can be defined. See the section "Predefined Options
559 Used with the \fB-o\fR Option", below.
563 .ne 2
565 \fB\fB-P\fR \fIpaper-name\fR\fR
567 .sp .6
568 .RS 4n
569 Specify a paper type list that the printer supports.
573 .ne 2
575 \fB\fB-r\fR \fIclass\fR\fR
577 .sp .6
578 .RS 4n
579 Remove \fIprinter\fR from the specified \fIclass\fR. If \fIprinter\fR is the
580 last member of \fIclass\fR, then \fIclass\fR is removed.
584 .ne 2
586 \fB\fB-S\fR \fIlist\fR\fR
588 .sp .6
589 .RS 4n
590 Allow either the print wheels or aliases for character sets named in \fIlist\fR
591 to be used on the printer.
593 If the printer is a type that takes print wheels, then \fIlist\fR is a comma or
594 space separated list of print wheel names. These are the only print wheels
595 considered mountable on the printer. (You can always force a different print
596 wheel to be mounted.) Until the option is used to specify a list, no print
597 wheels are considered mountable on the printer, and print requests that ask for
598 a particular print wheel with this printer are rejected.
600 If the printer is a type that has selectable character sets, then \fIlist\fR is
601 a list of character set name ``mappings'' or aliases. Each ``mapping'' is of
602 the form \fIknown-name=alias\fR The \fIknown-name\fR is a character set number
603 preceded by \fBcs\fR (such as \fBcs3\fR for character set three) or a character
604 set name from the \fBterminfo\fR database entry \fBcsnm\fR. See
605 \fBterminfo\fR(4). If this option is not used to specify a list, only the names
606 already known from the \fBterminfo\fR database or numbers with a prefix of
607 \fBcs\fR is acceptable for the printer. If \fIlist\fR is the word \fBnone\fR,
608 any existing print wheel lists or character set aliases are removed.
610 Notice the other uses of the \fB-S\fR with the \fB-M\fR option described above.
612 The \fB-T\fR option must be invoked first with \fBlpadmin\fR to identify the
613 printer type before the \fB-S\fR option can be used.
617 .ne 2
619 \fB\fB-s\fR \fIsystem-name\fR\fR
621 .sp .6
622 .RS 4n
623 The \fB-s\fR option can be used for both remote or local printers. For remote
624 printers:
626 .ne 2
628 \fB\fB-s\fR \fIsystem-name\fR[\fB!\fR\fIprinter-name\fR] (UUCP format)\fR
632 \fB\fB-s\fR \fIprinter-name\fR\fB@\fR\fIsystem-name\fR (RCMD format)\fR
634 .sp .6
635 .RS 4n
636 Make a remote printer (one that must be accessed through another system)
637 accessible to users on your system. \fIsystem-name\fR is the name of the remote
638 system on which the remote printer is located it. \fIprinter-name\fR is the
639 name used on the remote system for that printer. For example, if you want to
640 access \fIprinter1\fR on \fIsystem1\fR and you want it called \fIprinter2\fR on
641 your system:
643 .in +2
645 \fB-p\fR \fIprinter2\fR \fB-s\fR \fIsystem1\fR\fB!\fR\fIprinter1\fR
647 .in -2
651 .in +2
653 \fB-p\fR \fIprinter2\fR \fB-s\fR \fIprinter1\fR\fB@\fR\fIsystem1\fR
655 .in -2
661 .ne 2
663 \fB\fB-s\fR \fIscheme\fR\fB://\fR\fIend-point\fR (URI format)\fR
665 .sp .6
666 .RS 4n
667 Make a remote printer (one that must be accessed through another system)
668 accessible to users on your system. The supported schemes include \fBlpd\fR and
669 \fBipp\fR. Specify URI's using the \fBlpd\fR format as follows:
671 .in +2
673 \fBlpd://\fR\fIserver\fR/\fIprinters\fR/\fIqueue\fR\fB[#Solaris]\fR
675 .in -2
678 URI's using the \fBipp\fR format are defined by the remote print server. They
679 are generally of the format:
681 .in +2
683 \fBipp://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR
685 .in -2
688 In either case, \fIserver\fR specifies the hostname or IP address of the remote
689 print server, \fIqueue\fR specifies the name of the print queue on the remote
690 print server, and the optional \fB#Solaris\fRspecifies that the remote print
691 server is a Solaris server when \fBlpd\fR URI format is being used.
693 For example:
695 .in +2
697 \fB-p\fR \fIprinter\fR \fB-s\fR \fBlpd://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR\fB#Solaris\fR
698 \fB-p\fR \fIprinter\fR \fB-s\fR \fBipp://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR
700 .in -2
705 For local printers:
707 .ne 2
709 \fB\fB-s\fR "\fBlocalhost\fR"\fR
711 .RS 18n
712 Use \fBlocalhost\fR for the \fIsystem-name\fR to be used by the print service.
713 In an environment where the nodename is variable, print queues are invalidated
714 when the nodename changes. Using \fBlocalhost\fR as the \fIsystem-name\fR
715 allows print queues to be maintained across changing nodenames. The
716 \fIsystem-name\fR, as used by the print service, is only set to \fBlocalhost\fR
717 when explicitely set with this option; by default, \fBlpadmin\fR sets
718 \fIsystem-name\fR to \fInodename\fR. For example, if you want to configure a
719 new printer on the local system, and want it called \fIprinter3\fR:
721 \fB-p\fR \fIprinter3\fR \fB-s\fR \fIlocalhost\fR \fB-v\fR \fIdevice\fR
723 This option should never be used when creating name service maps.
729 .ne 2
731 \fB\fB-T\fR \fIprinter-type-list\fR\fR
733 .sp .6
734 .RS 4n
735 Identify the printer as being of one or more \fIprinter-type\fRs. Each
736 \fIprinter-type\fR is used to extract data from the \fBterminfo\fR database;
737 this information is used to initialize the printer before printing each user's
738 request. Some filters might also use a \fIprinter-type\fR to convert content
739 for the printer. If this option is not used, the default \fIprinter-type\fR is
740 \fBunknown\fR. No information is extracted from \fBterminfo\fR so each user
741 request is printed without first initializing the printer. Also, this option
742 must be used if the following are to work: \fB\fR\fB-o\fR\fB cpi\fR,
743 \fB\fR\fB-o\fR\fB lpi\fR, \fB\fR\fB-o\fR width, and \fB\fR\fB-o\fR\fB length\fR
744 options of the \fBlpadmin\fR and \fBlp\fR commands, and the \fB-S\fR and
745 \fB-f\fR options of the \fBlpadmin\fR command.
747 If the \fIprinter-type-list\fR contains more than one type, then the
748 \fIcontent-type-list\fR of the \fB-I\fR option must either be specified as
749 \fBsimple\fR, as empty (\fB\fR\fB-I\fR\fB ""\fR), or not specified at all.
753 .ne 2
755 \fB\fB\fR\fB-t\fR\fInumber-of-trays\fR\fR
757 .sp .6
758 .RS 4n
759 Specify the number of trays when creating the printer.
763 .ne 2
765 \fB\fB-u\fR \fBallow:\fR\fIlogin-ID-list\fR\fR
769 \fB\fB-u\fR \fBdeny:\fR\fIlogin-ID-list\fR\fR
771 .sp .6
772 .RS 4n
773 Allow or deny the users in \fIlogin-ID-list\fR access to the printer. By
774 default all users are allowed on a new printer. The \fIlogin-ID-list\fR
775 argument can include any or all of the following constructs:
777 .ne 2
779 \fB\fIlogin-ID\fR\fR
781 .RS 24n
782 a user on any system
786 .ne 2
788 \fB\fIsystem-name\fR\fB!\fR\fIlogin-ID\fR\fR
790 .RS 24n
791 a user on system \fIsystem-name\fR
795 .ne 2
797 \fB\fIsystem-name\fR\fB!all\fR\fR
799 .RS 24n
800 all users on system \fIsystem-name\fR
804 .ne 2
806 \fB\fBall!\fR\fIlogin-ID\fR\fR
808 .RS 24n
809 a user on all systems
813 .ne 2
815 \fB\fBall\fR\fR
817 .RS 24n
818 all users on all systems
821 For each printer, the \fBLP\fR print service keeps two lists of users: an
822 ``allow-list'' of people allowed to use the printer, and a ``deny-list'' of
823 people denied access to the printer. With the \fB\fR\fB-u\fR\fB allow\fR
824 option, the users listed are added to the allow-list and removed from the
825 deny-list. With the \fB\fR\fB-u\fR\fB deny\fR option, the users listed are
826 added to the deny-list and removed from the allow-list.
828 If the allow-list is not empty, only the users in the list can use the printer,
829 regardless of the contents of the deny-list. If the allow-list is empty, but
830 the deny-list is not, the users in the deny-list cannot use the printer. All
831 users can be denied access to the printer by specifying \fB\fR\fB-u\fR\fB
832 deny:all\fR. All users can use the printer by specifying \fB\fR\fB-u\fR\fB
833 allow:all\fR.
837 .ne 2
839 \fB\fR
841 .sp .6
842 .RS 4n
843 The \fB-U\fR option allows your print service to access a remote printer. (It
844 does not enable your print service to access a remote printer service.)
845 Specifically, \fB-U\fR assigns the ``dialing'' information \fIdial-info\fR to
846 the printer. \fIdial-info\fR is used with the \fBdial\fR routine to call the
847 printer. Any network connection supported by the Basic Networking Utilities
848 works. \fIdial-info\fR can be either a phone number for a modem connection, or
849 a system name for other kinds of connections. Or, if \fB-U\fR \fBdirect\fR is
850 given, no dialing takes place, because the name \fBdirect\fR is reserved for a
851 printer that is directly connected. If a system name is given, it is used to
852 search for connection details from the file \fB/etc/uucp/Systems\fR or related
853 files. The Basic Networking Utilities are required to support this option. By
854 default, \fB\fR\fB-U\fR\fB direct\fR is assumed.
858 .ne 2
860 \fB\fB\fR\fB-v\fR \fIdevice\fR\fR
862 .sp .6
863 .RS 4n
864 Associate a \fIdevice\fR with \fIprinter\fR. \fIdevice\fR is the path name of a
865 file that is writable by \fBlp\fR. Notice that the same \fIdevice\fR can be
866 associated with more than one printer.
870 .ne 2
872 \fB\fB-v\fR \fIscheme\fR\fB://\fR\fIend-point\fR\fR
874 .sp .6
875 .RS 4n
876 Associate a network attached device with printer.
878 \fIscheme\fR is the method or protocol used to access the network attached
879 device and \fIend-point\fR is the information necessary to contact that network
880 attached device. Use of this device format requires the use of the \fBuri\fR
881 interface script and can only be used with the \fBsmb\fR scheme at this time.
883 For example:
885 .in +2
887 # lpadmin \fB-p\fR \fIqueue\fR \fB-v\fR \fBsmb://smb-\fR\fIservice\fR\fB/\fR\fIprinter\fR \fB-m\fR \fBuri\fR
889 .in -2
892 See the \fBsmbspool\fR man page for details.
895 .SS "Removing a Printer Destination"
897 The \fB-x\fR \fIdest\fR option removes the destination \fIdest\fR (a printer or
898 a class), from the \fBLP\fR print service. If \fIdest\fR is a printer and is
899 the only member of a class, then the class is deleted, too. If \fIdest\fR is
900 \fBall\fR, all printers and classes are removed. If there are no remaining
901 local printers and the scheduler is still running, the scheduler is shut down.
904 No other \fIoptions\fR are allowed with \fB-x\fR.
905 .SS "Setting/Changing the System Default Destination"
907 The \fB-d\fR [\fIdest\fR] option makes \fIdest\fR (an existing printer or
908 class) the new system default destination. If \fIdest\fR is not supplied, then
909 there is no system default destination. No other \fIoptions\fR are allowed with
910 \fB-d\fR.
911 .SS "Setting an Alert for a Print Wheel"
912 .ne 2
914 \fB\fB-S\fR \fIprint-wheel\fR [\fB-A\fR \fIalert-type\fR] [\fB-W\fR
915 \fIminutes\fR] [\fB-Q\fR \fIrequests\fR] \fB-T\fR\fR
917 .sp .6
918 .RS 4n
919 The \fB-S\fR \fIprint-wheel\fR option is used with the \fB-A\fR
920 \fIalert-type\fR option to define an alert to mount the print wheel when there
921 are jobs queued for it. If this command is not used to arrange alerting for a
922 print wheel, no alert is sent for the print wheel. Notice the other use of
923 \fB-A\fR, with the \fB-p\fR option, above.
925 The \fIalert-types\fR are:
927 .ne 2
929 \fB\fBmail\fR\fR
931 .RS 17n
932 Send the alert message using the \fBmail\fR command to the administrator.
936 .ne 2
938 \fB\fBwrite\fR\fR
940 .RS 17n
941 Write the message, using the \fBwrite\fR command, to the terminal on which the
942 administrator is logged in. If the administrator is logged in on several
943 terminals, one is arbitrarily chosen.
947 .ne 2
949 \fB\fBquiet\fR\fR
951 .RS 17n
952 Do not send messages for the current condition. An administrator can use this
953 option to temporarily stop receiving further messages about a known problem.
954 Once the \fIprint-wheel\fR has been mounted and subsequently unmounted,
955 messages are sent againwhen the number of print requests reaches the threshold
956 specified by the \fB-Q\fR option.
960 .ne 2
962 \fB\fBnone\fR\fR
964 .RS 17n
965 Do not send messages until the \fB-A\fR option is given again with a different
966 \fIalert-type\fR (other than \fBquiet\fR).
970 .ne 2
972 \fB\fIshell-command\fR\fR
974 .RS 17n
975 Run the \fIshell-command\fR each time the alert needs to be sent. The shell
976 command should expect the message in standard input. If there are blanks
977 embedded in the command, enclose the command in quotes. Notice that the
978 \fBmail\fR and \fBwrite\fR values for this option are equivalent to the values
979 \fBmail\fR \fIuser-name\fR and \fBwrite\fR \fIuser-name\fR respectively, where
980 \fIuser-name\fR is the current name for the administrator. This is the login
981 name of the person submitting this command unless he or she has used the
982 \fBsu\fR command to change to another user ID. If the \fBsu\fR command has been
983 used to change the user ID, then the \fIuser-name\fR for the new ID is used.
987 .ne 2
989 \fB\fBlist\fR\fR
991 .RS 17n
992 Display the type of the alert for the print wheel on standard output. No change
993 is made to the alert.
996 The message sent appears as follows:
998 .in +2
1000 The print wheel \fIprint-wheel\fR needs to be mounted
1001 on the printer(s):
1002 \fIprinter\fR(\fIinteger1\fRrequests) \fIinteger2\fR print requests
1003 await this print wheel.
1005 .in -2
1008 The printers listed are those that the administrator had earlier specified were
1009 candidates for this print wheel. The number \fIinteger1\fR listed next to each
1010 printer is the number of requests eligible for the printer. The number
1011 \fIinteger2\fR shown after the printer list is the total number of requests
1012 awaiting the print wheel. It is less than the sum of the other numbers if some
1013 requests can be handled by more than one printer.
1015 If the \fIprint-wheel\fR is \fBall\fR, the alerting defined in this command
1016 applies to all print wheels already defined to have an alert.
1018 If the \fB-W\fR option is not given, the default procedure is that only one
1019 message is sent per need to mount the print wheel. Not specifying the \fB-W\fR
1020 option is equivalent to specifying \fB\fR\fB-W\fR\fB once\fR or \fB-W\fR
1021 \fB0\fR. If \fIminutes\fR is a number greater than zero, an alert is sent at
1022 intervals specified by \fIminutes\fR.
1024 If the \fB-Q\fR option is also given, the alert is sent when a certain number
1025 (specified by the argument \fIrequests\fR) of print requests that need the
1026 print wheel are waiting. If the \fB-Q\fR option is not given, or \fIrequests\fR
1027 is 1 or \fBany\fR (which are both the default), a message is sent as soon as
1028 anyone submits a print request for the print wheel when it is not mounted.
1031 .SH PREDEFINED OPTIONS USED WITH THE \fB-o\fR OPTION
1033 A number of options, described below, are predefined for use with \fB-o\fR.
1034 These options are used for adjusting printer capabilities, adjusting printer
1035 port characteristics, configuring network printers, and controlling the use of
1036 banner. The \fB-o\fR also supports an arbitrary \fB\fIkeyword\fR=\fIvalue\fR\fR
1037 format, which is referred to below as an undefined option.
1038 .SS "Adjusting Printer Capabilities"
1040 The \fBlength\fR, \fBwidth\fR, \fBcpi\fR, and \fBlpi\fR parameters can be used
1041 in conjunction with the \fB-o\fR option to adjust printer capabilities. The
1042 format of the parameters and their values is as follows:
1044 .in +2
1046 length=\fIscaled-decimal-number\fR
1047 width=\fIscaled-decimal-number\fR
1048 cpi=\fIscaled-decimal-number\fR
1049 lpi=\fIscaled-decimal-number\fR
1051 .in -2
1056 The term \fIscaled-decimal-number\fR refers to a non-negative number used to
1057 indicate a unit of size. The type of unit is shown by a ``trailing'' letter
1058 attached to the number. Three types of \fIscaled-decimal-numbers\fR can be used
1059 with the LP print service: numbers that show sizes in centimeters (marked with
1060 a trailing \fBc\fR); numbers that show sizes in inches (marked with a trailing
1061 \fBi\fR); and numbers that show sizes in units appropriate to use (without a
1062 trailing letter), that is, lines, characters, lines per inch, or characters per
1063 inch.
1066 The option values must agree with the capabilities of the type of physical
1067 printer, as defined in the terminfo database for the printer type. If they do
1068 not, the command is rejected.
1071 The defaults are defined in the \fBterminfo\fR entry for the specified printer
1072 type. The defaults can be reset by:
1074 .in +2
1076 \fBlpadmin -p \fIprintername\fR -o length=
1077 lpadmin -p \fIprintername\fR -o width=
1078 lpadmin -p \fIprintername\fR -o cpi=
1079 lpadmin -p \fIprintername\fR -o lpi=\fR
1081 .in -2
1084 .SS "Adjusting Printer Port Characteristics"
1086 You use the \fBstty\fR keyword in conjunction with the o option to adjust
1087 printer port characteristics. The general form of the \fBstty\fR portion of the
1088 command is:
1090 .in +2
1092 \fBstty="'\fR\fIstty-option-list\fR'"
1094 .in -2
1099 The \fIstty-option-list\fR is not checked for allowed values, but is passed
1100 directly to the \fBstty\fR program by the standard interface program. Any error
1101 messages produced by \fBstty\fR when a request is processed (by the standard
1102 interface program) are mailed to the user submitting the request.
1105 The default for \fBstty\fR is:
1107 .in +2
1109 stty="'9600 cs8 -cstopb -parenb ixon
1110      -ixany opost -olcuc onlcr
1111      -ocrnl -onocr
1112      -onlret -ofill nl0 cr0 tab0 bs0 vt0 ff0'"
1114 .in -2
1119 The default can be reset by:
1121 .in +2
1123 \fBlpadmin -p \fIprintername\fR -o stty=\fR
1125 .in -2
1128 .SS "Configuring Network Printers"
1130 The \fBdest\fR, \fBprotocol\fR, \fBbsdctrl\fR, and \fBtimeout\fR parameters are
1131 used in conjunction with the \fB-o\fR option to configure network printers. The
1132 format of these keywords and their assigned values is as follows:
1134 .in +2
1136 dest=\fIstring\fR protocol=\fIstring\fR bsdctrl=\fIstring\fR \e
1137      timeout=\fInon-negative-integer-seconds\fR
1139 .in -2
1144 These four options are provided to support network printing. Each option is
1145 passed directly to the interface program; any checking for allowed values is
1146 done there.
1149 The value of \fBdest\fR is the name of the destination for the network printer;
1150 the semantics for value \fBdest\fR are dependent on the printer and the
1151 configuration. There is no default.
1154 The value of option \fBprotocol\fR sets the over-the-wire protocol to the
1155 printer. The default for option \fBprotocol\fR is \fBbsd\fR. The value of
1156 option \fBbsdctrl\fR sets the print order of control and data files (BSD
1157 protocol only); the default for this option is \fBcontrol file first\fR. The
1158 value of option \fBtimeout\fR sets the seed value for backoff time when the
1159 printer is busy. The default value for the \fBtimeout\fR option is \fB10\fR
1160 seconds. The defaults can be reset by:
1162 .in +2
1164 \fBlpadmin -p \fIprintername\fR -o protocol=
1165 lpadmin -p \fIprintername\fR \fR\fB-o bsdctrl=\fR
1166 lpadmin -p \fIprintername\fR -o timeout=
1168 .in -2
1171 .SS "Controlling the Use of the Banner Page"
1173 Use the following commands to control the use of the banner page:
1175 .in +2
1177 \fBlpadmin -p \fIprinter\fR -o nobanner\fR
1178 \fBlpadmin -p \fIprinter\fR -o banner\fR
1179 \fBlpadmin -p \fIprinter\fR -o banner=always\fR
1180 \fBlpadmin -p \fIprinter\fR -o banner=never\fR
1181 \fBlpadmin -p \fIprinter\fR -o banner=optional\fR
1183 .in -2
1188 The first and fifth commands (\fB-o\fR \fBnobanner\fR and \fB-o\fR
1189 \fBbanner=optional\fR) are equivalent. The default is to print the banner page,
1190 unless a user specifies \fB-o\fR \fBnobanner\fR on an \fBlp\fR command line.
1193 The second and third commands (\fB-o\fR \fBbanner\fR and \fB-o\fR
1194 \fBbanner=always\fR) are equivalent. Both cause a banner page to be printed
1195 always, even if a user specifies \fBlp\fR \fB-o\fR \fBnobanner\fR. The root
1196 user can override this command.
1199 The fourth command (\fB-o\fR \fBbanner=never\fR) causes a banner page never to
1200 be printed, even if a user specifies \fBlp\fR \fB-o\fR \fBbanner\fR. The root
1201 user can override this command.
1202 .SS "Undefined Options"
1204 The \fB-o\fR option supports the use of arbitrary, user-defined options with
1205 the following format:
1207 .ne 2
1209 \fB\fIkey\fR\fB=\fR\fIvalue\fR\fR
1211 .sp .6
1212 .RS 4n
1213 Each \fIkey\fR\fB=\fR\fIvalue\fR is passed directly to the interface program.
1214 Any checking for allowed values is done in the interface program.
1216 Any default values for a given \fIkey\fR\fB=\fR\fIvalue\fR option are defined
1217 in the interface program. If a default is provided, it can be reset by typing
1218 the key without any value:
1220 .in +2
1222 lpadmin -p \fIprintername\fR -o \fIkey\fR=
1224 .in -2
1230 .ne 2
1232 \fB\fBlpadmin\fR \fB-p\fR \fIprinter\fR \fB-o\fR \fBfoo | nofoo\fR\fR
1234 .sp .6
1235 .RS 4n
1236 Sets boolean values \fBfoo=true | foo=false\fR.
1239 .SH EXAMPLES
1241 In the following examples, \fIprtr\fR can be any name up to 14 characters and
1242 can be the same name as the \fBping\fR(1M) name.
1244 \fBExample 1 \fRConfiguring an HP Postscript Printer with a Jet Direct Network
1245 Interface
1248 The following example configures an HP postscript printer with a jet direct
1249 network interface:
1252 .in +2
1254 example# \fBlpadmin -p \fIprtr\fR -v /dev/null -m netstandard \e
1255           -o dest=\fIping_name_of_prtr\fR:9100 -o protocol=tcp -T PS -I \e
1256            postscript\fR
1257 example# \fBenable \fIprtr\fR\fR
1258 example# \fBaccept \fIprtr\fR\fR
1260 .in -2
1264 \fBExample 2 \fRConfiguring a Standard Postscript Network Printer
1267 The following example configures a standard postscript network printer:
1270 .in +2
1272 example# \fBlpadmin -p \fIprtr\fR -v /dev/null -m netstandard \e
1273          -o dest=\fIping_name_of_prtr\fR -T PS -I postscript\fR
1274 example# \fBenable \fIprtr\fR\fR
1275 example# \fBaccept \fIprtr\fR\fR
1277 .in -2
1280 .SH EXIT STATUS
1282 The following exit values are returned:
1284 .ne 2
1286 \fB\fB0\fR\fR
1288 .RS 12n
1289 Successful completion.
1293 .ne 2
1295 \fBnon-zero\fR
1297 .RS 12n
1298 An error occurred.
1301 .SH FILES
1302 .ne 2
1304 \fB\fB/var/spool/lp/*\fR\fR
1306 .RS 26n
1311 .ne 2
1313 \fB\fB/etc/lp\fR\fR
1315 .RS 26n
1320 .ne 2
1322 \fB\fB/etc/lp/alerts/printer\fR\fR
1324 .RS 26n
1325 Fault handler for \fBlpadmin\fR
1329 .ne 2
1331 \fB\fB/etc/printers.conf\fR\fR
1333 .RS 26n
1334 System printer configuration database
1337 .SH ATTRIBUTES
1339 See \fBattributes\fR(5) for descriptions of the following attributes:
1344 box;
1345 c | c
1346 l | l .
1347 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1349 Interface Stability     Obsolete
1352 .SH SEE ALSO
1354 \fBenable\fR(1), \fBlp\fR(1), \fBlpstat\fR(1), \fBmail\fR(1), \fBstty\fR(1),
1355 \fBaccept\fR(1M), \fBlpforms\fR(1M), \fBlpsched\fR(1M), \fBlpsystem\fR(1M),
1356 \fBping\fR(1M), \fBdial\fR(3NSL), \fBterminfo\fR(4), \fBattributes\fR(5)
1359 \fI\fR
1360 .SH NOTES
1362 When using lpadmin to provide access to a remote printer, remote configuration
1363 data is stored in \fB/etc/printers.conf\fR. This data includes a \fBbsdaddr\fR
1364 and a \fBprinter-uri-supported\fR attribute. The data in this file can be
1365 shared through the use of a network name service or replicated across multiple
1366 systems. If the data is shared, it is important to make sure that the
1367 \fBbsdaddr\fR and \fBprinter-uri-supported\fR contain hostname information that
1368 is correctly resolved on all hosts sharing this data. Also, the
1369 \fBprinter-uri-supported\fR is the preferred means of accessing remote print
1370 service. The \fBbsdaddr\fR is supplied for backward compatibility with Solaris
1371 2.6-10 systems.