1lpadmin(1M) System Administration Commands lpadmin(1M)
2
3
4
6 lpadmin - configure the LP print service
7
9 lpadmin -p printer {options}
10
11
12 lpadmin -x dest
13
14
15 lpadmin -d [dest]
16
17
18 lpadmin -S print-wheel -T [-A alert-type] [-W minutes]
19 [-Q requests]
20
21
23 lpadmin configures the LP print service by defining printers and
24 devices. It is used to add and change printers, to remove printers from
25 service, to set or change the system default destination, to define
26 alerts for printer faults, and to mount print wheels.
27
29 The lpadmin command has options for:
30
31 o Adding or changing a printer
32
33 o Removing a printer destination
34
35 o Setting or changing the system default destination
36
37 o Setting an alert for a print wheel
38
39
40 The options for each of the above categories are specified in the fol‐
41 lowing subsections.
42
43
44 Several options support the use of lists. A list might contain, for
45 example, user names, printers, printer forms, or content types. A list
46 of multiple items can have the form of either comma-separated names or
47 have the entire list enclosed by double quotes with a space between
48 each name. For example, both lists below are acceptable:
49
50 one,two,three
51 "one two three"
52
53
54 Adding or Changing a Printer
55 The first form of the lpadmin command (lpadmin -p printer {options})
56 configures a new printer or changes the configuration of an existing
57 printer. It also starts the print scheduler.
58
59
60 When creating a new printer, one of three options (-v, -U, or -s) must
61 be supplied. In addition, only one of the following can be supplied:
62 -e, -i, or -m; if none of these three options is supplied, the model
63 standard is used. The -h and -l options are mutually exclusive. Printer
64 and class names must be no longer than 14 characters and must consist
65 entirely of the characters A-Z, a-z, 0-9, dash (-) and underscore (_).
66 If -s is specified, the following options are invalid: -A, -e, -F, -h,
67 -i, -l, -M, -m, -o, -U, -v, and -W.
68
69
70 The following options can appear in any order.
71
72 -A alert-type [-W minutes]
73
74 The -A option is used to define an alert that informs the adminis‐
75 trator when a printer fault is detected, and periodically there‐
76 after, until the printer fault is cleared by the administrator. The
77 alert-types are:
78
79 mail Send the alert message using mail (see mail(1)) to
80 the administrator.
81
82
83 write Write the message to the terminal on which the
84 administrator is logged in. If the administrator
85 is logged in on several terminals, one is chosen
86 arbitrarily.
87
88
89 quiet Do not send messages for the current condition. An
90 administrator can use this option to temporarily
91 stop receiving further messages about a known
92 problem. Once the fault has been cleared and
93 printing resumes, messages are sent again when
94 another fault occurs with the printer.
95
96
97 showfault Attempt to execute a fault handler on each system
98 that has a print job in the queue. The fault han‐
99 dler is /etc/lp/alerts/printer. It is invoked with
100 three parameters: printer_name, date, file_name.
101 The file_name is the name of a file containing the
102 fault message.
103
104
105 none Do not send messages; any existing alert defini‐
106 tion for the printer is removed. No alert is sent
107 when the printer faults until a different alert-
108 type (except quiet) is used.
109
110
111 shell-command Run the shell-command each time the alert needs to
112 be sent. The shell command should expect the mes‐
113 sage in standard input. If there are blank spaces
114 embedded in the command, enclose the command in
115 quotes. Notice that the mail and write values for
116 this option are equivalent to the values mail
117 user-name and write user-name respectively, where
118 user-name is the current name for the administra‐
119 tor. This is the login name of the person submit‐
120 ting this command unless he or she has used the su
121 command to change to another user ID. If the su
122 command has been used to change the user ID, then
123 the user-name for the new ID is used.
124
125
126 list Display the type of the alert for the printer
127 fault. No change is made to the alert.
128
129 When a fault occurs, the printing subsystem displays a message
130 indicating that printing for a specified printer has stopped and
131 the reason for the stoppage. The message also indicates that print‐
132 ing will restart in a few minutes and that you can enter an enable
133 command if you want to restart sooner than that.
134
135 Following a fault that occurs in the middle of a print job, the job
136 is reprinted from the beginning. An exception to this occurs when
137 you enter a command, such as the one shown below, that changes the
138 page list to be printed.
139
140 % lp -i request-id -P ...
141
142
143 For a given print request, the presence of multiple reasons for
144 failure indicate multiple attempts at printing.
145
146 The LP print service can detect printer faults only through an ade‐
147 quate fast filter and only when the standard interface program or a
148 suitable customized interface program is used. Furthermore, the
149 level of recovery after a fault depends on the capabilities of the
150 filter.
151
152 If, instead of a single printer, the keyword all is displayed in an
153 alert, the alert applies to all printers.
154
155 If the -W option is not used to arrange fault alerting for printer,
156 the default procedure is to mail one message to the administrator
157 of printer per fault. This is equivalent to specifying -W once or
158 -W 0. If minutes is a number greater than zero, an alert is sent at
159 intervals specified by minutes.
160
161
162 -c class
163
164 Insert printer into the specified class. class is created if it
165 does not already exist. This option requires the -U dial-info or -v
166 device options.
167
168
169 -D comment
170
171 Save this comment for display whenever a user asks for a full
172 description of printer (see lpstat(1)). The LP print service does
173 not interpret this comment.
174
175
176 -e printer
177
178 Copy the interface program of an existing printer to be the inter‐
179 face program for printer. (Options -i and -m must not be specified
180 with this option.)
181
182
183 -f allow:form-list
184 -f deny:form-list
185
186 Allow or deny the forms in form-list to be printed on printer. By
187 default no forms are allowed on a new printer.
188
189 For each printer, the LP print service keeps two lists of forms: an
190 ``allow-list'' of forms that can be used with the printer, and a
191 ``deny-list'' of forms that cannot be used with the printer. With
192 the -f allow option, the forms listed are added to the allow-list
193 and removed from the deny-list. With the -f deny option, the forms
194 listed are added to the deny-list and removed from the allow-list.
195
196 If the allow-list is not empty, only the forms in the list can be
197 used on the printer, regardless of the contents of the deny-list.
198 If the allow-list is empty, but the deny-list is not, the forms in
199 the deny-list cannot be used with the printer. All forms can be
200 excluded from a printer by specifying -f deny:all. All forms can be
201 used on a printer (provided the printer can handle all the charac‐
202 teristics of each form) by specifying -f allow:all.
203
204 The LP print service uses this information as a set of guidelines
205 for determining where a form can be mounted. Administrators, how‐
206 ever, are not restricted from mounting a form on any printer. If
207 mounting a form on a particular printer is in disagreement with the
208 information in the allow-list or deny-list, the administrator is
209 warned but the mount is accepted. Nonetheless, if a user attempts
210 to issue a print or change request for a form and printer combina‐
211 tion that is in disagreement with the information, the request is
212 accepted only if the form is currently mounted on the printer. If
213 the form is later unmounted before the request can print, the
214 request is canceled and the user is notified by mail.
215
216 If the administrator tries to specify a form as acceptable for use
217 on a printer that does not have the capabilities needed by the
218 form, the command is rejected.
219
220 Notice the other use of -f, with the -M option, below.
221
222 The -T option must be invoked first with lpadmin to identify the
223 printer type before the -f option can be used.
224
225
226 -F fault-recovery
227
228 This option specifies the recovery to be used for any print request
229 that is stopped because of a printer fault, according to the value
230 of fault-recovery:
231
232 continue Continue printing on the top of the page where print‐
233 ing stopped. This requires a filter to wait for the
234 fault to clear before automatically continuing.
235
236
237 beginning Start printing the request again from the beginning.
238
239
240 wait Disable printing on printer and wait for the adminis‐
241 trator or a user to enable printing again.
242
243 During the wait, the administrator or the user who
244 submitted the stopped print request can issue a change
245 request that specifies where printing should resume.
246 (See the -i option of the lp command.) If no change
247 request is made before printing is enabled, printing
248 resumes at the top of the page where stopped, if the
249 filter allows; otherwise, the request is printed from
250 the beginning.
251
252
253
254 -h
255
256 Indicate that the device associated with the printer is hardwired.
257 If neither of the mutually exclusive options, -h and -l, is speci‐
258 fied, -h is assumed.
259
260
261 -i interface
262
263 Establish a new interface program for printer. interface is the
264 pathname of the new program. (The -e and -m options must not be
265 specified with this option.)
266
267
268 -I content-type-list
269
270 Allow printer to handle print requests with the content types
271 listed in a content-type-list.
272
273 The type simple is recognized as the default content type for files
274 in the UNIX system. A simple type of file is a data stream contain‐
275 ing only printable ASCII characters and the following control char‐
276 acters:
277
278
279
280
281 Control Char Octal Value Meaning
282 BACKSPACE 10 Move back one char, except
283 at beginning of line
284 TAB 11 Move to next tab stop
285 LINEFEED 12 Move to beginning of
286 (newline) next line
287 FORMFEED 14 Move to beginning of
288 next page
289 RETURN 15 Move to beginning of
290 current line
291
292 To prevent the print service from considering simple a valid type
293 for the printer, specify either an explicit value (such as the
294 printer type) in the content-type-list, or an empty list. If you do
295 want simple included along with other types, you must include sim‐
296 ple in the content-type-list.
297
298 In addition to content types defined by the print administrator,
299 the type PostScript is recognized and supported by the Solaris
300 print subsystem. This includes filters to support PostScript as the
301 printer content type.
302
303 The type any is recognized as a special content type for files.
304 When declared as the input type for a printer, it signals the print
305 sub-system not to do any filtering on the file before sending it to
306 the printer.
307
308 Except for simple and any, each content-type name is determined by
309 the administrator. If the printer type is specified by the -T
310 option, then the printer type is implicitly considered to be also a
311 valid content type.
312
313
314 -l
315
316 Indicate that the device associated with printer is a login termi‐
317 nal. The LP scheduler (lpsched) disables all login terminals auto‐
318 matically each time it is started. (The -h option must not be spec‐
319 ified with this option.)
320
321
322 -m model
323
324 Select model interface program, provided with the LP print service,
325 for the printer. (Options -e and -i must not be specified with this
326 option.)
327
328
329 -M -f form-name [-a [-o filebreak]] [-t tray-number]]
330
331 Mount the form form-name on printer. Print requests that need the
332 pre-printed form form-name is printed on printer. If more than one
333 printer has the form mounted and the user has specified any (with
334 the -d option of the lp command) as the printer destination, then
335 the print request is printed on the one printer that also meets the
336 other needs of the request.
337
338 The page length and width, and character and line pitches needed by
339 the form are compared with those allowed for the printer, by check‐
340 ing the capabilities in the terminfo database for the type of
341 printer. If the form requires attributes that are not available
342 with the printer, the administrator is warned but the mount is
343 accepted. If the form lists a print wheel as mandatory, but the
344 print wheel mounted on the printer is different, the administrator
345 is also warned but the mount is accepted.
346
347 If the -a option is given, an alignment pattern is printed, pre‐
348 ceded by the same initialization of the physical printer that pre‐
349 cedes a normal print request, with one exception: no banner page is
350 printed. Printing is assumed to start at the top of the first page
351 of the form. After the pattern is printed, the administrator can
352 adjust the mounted form in the printer and press return for another
353 alignment pattern (no initialization this time), and can continue
354 printing as many alignment patterns as desired. The administrator
355 can quit the printing of alignment patterns by typing q.
356
357 If the -o filebreak option is given, a formfeed is inserted between
358 each copy of the alignment pattern. By default, the alignment pat‐
359 tern is assumed to correctly fill a form, so no formfeed is added.
360
361 If the -t tray-number option is specified, printer tray tray-number
362 is used.
363
364 A form is ``unmounted'' either by mounting a new form in its place
365 or by using the -f none option. By default, a new printer has no
366 form mounted.
367
368 Notice the other use of -f without the -M option above.
369
370
371 -M -S print-wheel
372
373 Mount the print-wheel on printer. Print requests that need the
374 print-wheel are printed on printer. If more than one printer has
375 print-wheel mounted and the user has specified any (with the -d
376 option of the lp command) as the printer destination, then the
377 print request is printed on the one printer that also meets the
378 other needs of the request.
379
380 If the print-wheel is not listed as acceptable for the printer, the
381 administrator is warned but the mount is accepted. If the printer
382 does not take print wheels, the command is rejected.
383
384 A print wheel is ``unmounted'' either by mounting a new print wheel
385 in its place or by using the option -S none. By default, a new
386 printer has no print wheel mounted.
387
388 Notice the other uses of the -S option without the -M option
389 described below.
390
391
392 -n ppdfilename
393
394 Specify a PPD file for creating and modifying printer queues.
395 ppdfilename is the full path and file name to the PPD file. Used in
396 conjunction with the -p, -d, -x, or -S options.
397
398
399 -o option
400
401 The -o option defines default printer configuration values given to
402 an interface program. The default can be explicitly overwritten for
403 individual requests by the user (see lp(1)), or taken from a
404 preprinted form description (see lpforms(1M) and lp(1)).
405
406 There are several options which are predefined by the system. In
407 addition, any number of key-value pairs can be defined. See the
408 section "Predefined Options Used with the -o Option", below.
409
410
411 -P paper-name
412
413 Specify a paper type list that the printer supports.
414
415
416 -r class
417
418 Remove printer from the specified class. If printer is the last
419 member of class, then class is removed.
420
421
422 -S list
423
424 Allow either the print wheels or aliases for character sets named
425 in list to be used on the printer.
426
427 If the printer is a type that takes print wheels, then list is a
428 comma or space separated list of print wheel names. These are the
429 only print wheels considered mountable on the printer. (You can
430 always force a different print wheel to be mounted.) Until the
431 option is used to specify a list, no print wheels are considered
432 mountable on the printer, and print requests that ask for a partic‐
433 ular print wheel with this printer are rejected.
434
435 If the printer is a type that has selectable character sets, then
436 list is a list of character set name ``mappings'' or aliases. Each
437 ``mapping'' is of the form known-name=alias The known-name is a
438 character set number preceded by cs (such as cs3 for character set
439 three) or a character set name from the terminfo database entry
440 csnm. See terminfo(4). If this option is not used to specify a
441 list, only the names already known from the terminfo database or
442 numbers with a prefix of cs is acceptable for the printer. If list
443 is the word none, any existing print wheel lists or character set
444 aliases are removed.
445
446 Notice the other uses of the -S with the -M option described above.
447
448 The -T option must be invoked first with lpadmin to identify the
449 printer type before the -S option can be used.
450
451
452 -s system-name
453
454 The -s option can be used for both remote or local printers. For
455 remote printers:
456
457 -s system-name[!printer-name] (UUCP format)
458 -s printer-name@system-name (RCMD format)
459
460 Make a remote printer (one that must be accessed through
461 another system) accessible to users on your system. system-name
462 is the name of the remote system on which the remote printer is
463 located it. printer-name is the name used on the remote system
464 for that printer. For example, if you want to access printer1
465 on system1 and you want it called printer2 on your system:
466
467 -p printer2 -s system1!printer1
468
469
470
471 -p printer2 -s printer1@system1
472
473
474
475
476 -s scheme://end-point (URI format)
477
478 Make a remote printer (one that must be accessed through
479 another system) accessible to users on your system. The sup‐
480 ported schemes include lpd and ipp. Specify URI's using the lpd
481 format as follows:
482
483 lpd://server/printers/queue[#Solaris]
484
485
486 URI's using the ipp format are defined by the remote print
487 server. They are generally of the format:
488
489 ipp://server/printers/queue
490
491
492 In either case, server specifies the hostname or IP address of
493 the remote print server, queue specifies the name of the print
494 queue on the remote print server, and the optional #Solaris‐
495 specifies that the remote print server is a Solaris server when
496 lpd URI format is being used.
497
498 For example:
499
500 -p printer -s lpd://server/printers/queue#Solaris
501 -p printer -s ipp://server/printers/queue
502
503
504
505 For local printers:
506
507 -s "localhost" Use localhost for the system-name to be used by
508 the print service. In an environment where the
509 nodename is variable, print queues are invali‐
510 dated when the nodename changes. Using localhost
511 as the system-name allows print queues to be
512 maintained across changing nodenames. The system-
513 name, as used by the print service, is only set
514 to localhost when explicitely set with this
515 option; by default, lpadmin sets system-name to
516 nodename. For example, if you want to configure a
517 new printer on the local system, and want it
518 called printer3:
519
520 -p printer3 -s localhost -v device
521
522 This option should never be used when creating
523 name service maps.
524
525
526
527 -T printer-type-list
528
529 Identify the printer as being of one or more printer-types. Each
530 printer-type is used to extract data from the terminfo database;
531 this information is used to initialize the printer before printing
532 each user's request. Some filters might also use a printer-type to
533 convert content for the printer. If this option is not used, the
534 default printer-type is unknown. No information is extracted from
535 terminfo so each user request is printed without first initializing
536 the printer. Also, this option must be used if the following are to
537 work: -o cpi, -o lpi, -o width, and -o length options of the lpad‐
538 min and lp commands, and the -S and -f options of the lpadmin com‐
539 mand.
540
541 If the printer-type-list contains more than one type, then the con‐
542 tent-type-list of the -I option must either be specified as simple,
543 as empty (-I ""), or not specified at all.
544
545
546 -tnumber-of-trays
547
548 Specify the number of trays when creating the printer.
549
550
551 -u allow:login-ID-list
552 -u deny:login-ID-list
553
554 Allow or deny the users in login-ID-list access to the printer. By
555 default all users are allowed on a new printer. The login-ID-list
556 argument can include any or all of the following constructs:
557
558 login-ID a user on any system
559
560
561 system-name!login-ID a user on system system-name
562
563
564 system-name!all all users on system system-name
565
566
567 all!login-ID a user on all systems
568
569
570 all all users on all systems
571
572 For each printer, the LP print service keeps two lists of users: an
573 ``allow-list'' of people allowed to use the printer, and a ``deny-
574 list'' of people denied access to the printer. With the -u allow
575 option, the users listed are added to the allow-list and removed
576 from the deny-list. With the -u deny option, the users listed are
577 added to the deny-list and removed from the allow-list.
578
579 If the allow-list is not empty, only the users in the list can use
580 the printer, regardless of the contents of the deny-list. If the
581 allow-list is empty, but the deny-list is not, the users in the
582 deny-list cannot use the printer. All users can be denied access to
583 the printer by specifying -u deny:all. All users can use the
584 printer by specifying -u allow:all.
585
586
587
588
589 The -U option allows your print service to access a remote printer.
590 (It does not enable your print service to access a remote printer
591 service.) Specifically, -U assigns the ``dialing'' information
592 dial-info to the printer. dial-info is used with the dial routine
593 to call the printer. Any network connection supported by the Basic
594 Networking Utilities works. dial-info can be either a phone number
595 for a modem connection, or a system name for other kinds of connec‐
596 tions. Or, if -U direct is given, no dialing takes place, because
597 the name direct is reserved for a printer that is directly con‐
598 nected. If a system name is given, it is used to search for connec‐
599 tion details from the file /etc/uucp/Systems or related files. The
600 Basic Networking Utilities are required to support this option. By
601 default, -U direct is assumed.
602
603
604 -v device
605
606 Associate a device with printer. device is the path name of a file
607 that is writable by lp. Notice that the same device can be associ‐
608 ated with more than one printer.
609
610
611 -v scheme://end-point
612
613 Associate a network attached device with printer.
614
615 scheme is the method or protocol used to access the network
616 attached device and end-point is the information necessary to con‐
617 tact that network attached device. Use of this device format
618 requires the use of the uri interface script and can only be used
619 with the smb scheme at this time.
620
621 For example:
622
623 # lpadmin -p queue -v smb://smb-service/printer -m uri
624
625
626 See the /usr/sfw/man/man1m/smbspool.1m man page for details.
627
628
629 Removing a Printer Destination
630 The -x dest option removes the destination dest (a printer or a class),
631 from the LP print service. If dest is a printer and is the only member
632 of a class, then the class is deleted, too. If dest is all, all print‐
633 ers and classes are removed. If there are no remaining local printers
634 and the scheduler is still running, the scheduler is shut down.
635
636
637 No other options are allowed with -x.
638
639 Setting/Changing the System Default Destination
640 The -d [dest] option makes dest (an existing printer or class) the new
641 system default destination. If dest is not supplied, then there is no
642 system default destination. No other options are allowed with -d.
643
644 Setting an Alert for a Print Wheel
645 -S print-wheel [-A alert-type] [-W minutes] [-Q requests] -T
646
647 The -S print-wheel option is used with the -A alert-type option to
648 define an alert to mount the print wheel when there are jobs queued
649 for it. If this command is not used to arrange alerting for a print
650 wheel, no alert is sent for the print wheel. Notice the other use
651 of -A, with the -p option, above.
652
653 The alert-types are:
654
655 mail Send the alert message using the mail command to
656 the administrator.
657
658
659 write Write the message, using the write command, to the
660 terminal on which the administrator is logged in.
661 If the administrator is logged in on several ter‐
662 minals, one is arbitrarily chosen.
663
664
665 quiet Do not send messages for the current condition. An
666 administrator can use this option to temporarily
667 stop receiving further messages about a known
668 problem. Once the print-wheel has been mounted and
669 subsequently unmounted, messages are sent again‐
670 when the number of print requests reaches the
671 threshold specified by the -Q option.
672
673
674 none Do not send messages until the -A option is given
675 again with a different alert-type (other than
676 quiet).
677
678
679 shell-command Run the shell-command each time the alert needs to
680 be sent. The shell command should expect the mes‐
681 sage in standard input. If there are blanks embed‐
682 ded in the command, enclose the command in quotes.
683 Notice that the mail and write values for this
684 option are equivalent to the values mail user-name
685 and write user-name respectively, where user-name
686 is the current name for the administrator. This is
687 the login name of the person submitting this com‐
688 mand unless he or she has used the su command to
689 change to another user ID. If the su command has
690 been used to change the user ID, then the user-
691 name for the new ID is used.
692
693
694 list Display the type of the alert for the print wheel
695 on standard output. No change is made to the
696 alert.
697
698 The message sent appears as follows:
699
700 The print wheel print-wheel needs to be mounted
701 on the printer(s):
702 printer(integer1requests) integer2 print requests
703 await this print wheel.
704
705
706 The printers listed are those that the administrator had earlier
707 specified were candidates for this print wheel. The number integer1
708 listed next to each printer is the number of requests eligible for
709 the printer. The number integer2 shown after the printer list is
710 the total number of requests awaiting the print wheel. It is less
711 than the sum of the other numbers if some requests can be handled
712 by more than one printer.
713
714 If the print-wheel is all, the alerting defined in this command
715 applies to all print wheels already defined to have an alert.
716
717 If the -W option is not given, the default procedure is that only
718 one message is sent per need to mount the print wheel. Not specify‐
719 ing the -W option is equivalent to specifying -W once or -W 0. If
720 minutes is a number greater than zero, an alert is sent at inter‐
721 vals specified by minutes.
722
723 If the -Q option is also given, the alert is sent when a certain
724 number (specified by the argument requests) of print requests that
725 need the print wheel are waiting. If the -Q option is not given, or
726 requests is 1 or any (which are both the default), a message is
727 sent as soon as anyone submits a print request for the print wheel
728 when it is not mounted.
729
730
732 A number of options, described below, are predefined for use with -o.
733 These options are used for adjusting printer capabilities, adjusting
734 printer port characteristics, configuring network printers, and con‐
735 trolling the use of banner. The -o also supports an arbitrary key‐
736 word=value format, which is referred to below as an undefined option.
737
738 Adjusting Printer Capabilities
739 The length, width, cpi, and lpi parameters can be used in conjunction
740 with the -o option to adjust printer capabilities. The format of the
741 parameters and their values is as follows:
742
743 length=scaled-decimal-number
744 width=scaled-decimal-number
745 cpi=scaled-decimal-number
746 lpi=scaled-decimal-number
747
748
749
750
751 The term scaled-decimal-number refers to a non-negative number used to
752 indicate a unit of size. The type of unit is shown by a ``trailing''
753 letter attached to the number. Three types of scaled-decimal-numbers
754 can be used with the LP print service: numbers that show sizes in cen‐
755 timeters (marked with a trailing c); numbers that show sizes in inches
756 (marked with a trailing i); and numbers that show sizes in units appro‐
757 priate to use (without a trailing letter), that is, lines, characters,
758 lines per inch, or characters per inch.
759
760
761 The option values must agree with the capabilities of the type of phys‐
762 ical printer, as defined in the terminfo database for the printer type.
763 If they do not, the command is rejected.
764
765
766 The defaults are defined in the terminfo entry for the specified
767 printer type. The defaults can be reset by:
768
769 lpadmin -p printername -o length=
770 lpadmin -p printername -o width=
771 lpadmin -p printername -o cpi=
772 lpadmin -p printername -o lpi=
773
774
775
776 Adjusting Printer Port Characteristics
777 You use the stty keyword in conjunction with the o option to adjust
778 printer port characteristics. The general form of the stty portion of
779 the command is:
780
781 stty="'stty-option-list'"
782
783
784
785
786 The stty-option-list is not checked for allowed values, but is passed
787 directly to the stty program by the standard interface program. Any
788 error messages produced by stty when a request is processed (by the
789 standard interface program) are mailed to the user submitting the
790 request.
791
792
793 The default for stty is:
794
795 stty="'9600 cs8 -cstopb -parenb ixon
796 -ixany opost -olcuc onlcr
797 -ocrnl -onocr
798 -onlret -ofill nl0 cr0 tab0 bs0 vt0 ff0'"
799
800
801
802
803 The default can be reset by:
804
805 lpadmin -p printername -o stty=
806
807
808
809 Configuring Network Printers
810 The dest, protocol, bsdctrl, and timeout parameters are used in con‐
811 junction with the -o option to configure network printers. The format
812 of these keywords and their assigned values is as follows:
813
814 dest=string protocol=string bsdctrl=string \
815 timeout=non-negative-integer-seconds
816
817
818
819
820 These four options are provided to support network printing. Each
821 option is passed directly to the interface program; any checking for
822 allowed values is done there.
823
824
825 The value of dest is the name of the destination for the network
826 printer; the semantics for value dest are dependent on the printer and
827 the configuration. There is no default.
828
829
830 The value of option protocol sets the over-the-wire protocol to the
831 printer. The default for option protocol is bsd. The value of option
832 bsdctrl sets the print order of control and data files (BSD protocol
833 only); the default for this option is control file first. The value of
834 option timeout sets the seed value for backoff time when the printer is
835 busy. The default value for the timeout option is 10 seconds. The
836 defaults can be reset by:
837
838 lpadmin -p printername -o protocol=
839 lpadmin -p printername -o bsdctrl=
840 lpadmin -p printername -o timeout=
841
842
843
844 Controlling the Use of the Banner Page
845 Use the following commands to control the use of the banner page:
846
847 lpadmin -p printer -o nobanner
848 lpadmin -p printer -o banner
849 lpadmin -p printer -o banner=always
850 lpadmin -p printer -o banner=never
851 lpadmin -p printer -o banner=optional
852
853
854
855
856 The first and fifth commands (-o nobanner and -o banner=optional) are
857 equivalent. The default is to print the banner page, unless a user
858 specifies -o nobanner on an lp command line.
859
860
861 The second and third commands (-o banner and -o banner=always) are
862 equivalent. Both cause a banner page to be printed always, even if a
863 user specifies lp -o nobanner. The root user can override this command.
864
865
866 The fourth command (-o banner=never) causes a banner page never to be
867 printed, even if a user specifies lp -o banner. The root user can over‐
868 ride this command.
869
870 Undefined Options
871 The -o option supports the use of arbitrary, user-defined options with
872 the following format:
873
874 key=value
875
876 Each key=value is passed directly to the interface program. Any
877 checking for allowed values is done in the interface program.
878
879 Any default values for a given key=value option are defined in the
880 interface program. If a default is provided, it can be reset by
881 typing the key without any value:
882
883 lpadmin -p printername -o key=
884
885
886
887
888 lpadmin -p printer -o foo | nofoo
889
890 Sets boolean values foo=true | foo=false.
891
892
894 In the following examples, prtr can be any name up to 14 characters and
895 can be the same name as the ping(1M) name.
896
897 Example 1 Configuring an HP Postscript Printer with a Jet Direct Net‐
898 work Interface
899
900
901 The following example configures an HP postscript printer with a jet
902 direct network interface:
903
904
905 example# lpadmin -p prtr -v /dev/null -m netstandard \
906 -o dest=ping_name_of_prtr:9100 -o protocol=tcp -T PS -I \
907 postscript
908 example# enable prtr
909 example# accept prtr
910
911
912
913 Example 2 Configuring a Standard Postscript Network Printer
914
915
916 The following example configures a standard postscript network printer:
917
918
919 example# lpadmin -p prtr -v /dev/null -m netstandard \
920 -o dest=ping_name_of_prtr -T PS -I postscript
921 example# enable prtr
922 example# accept prtr
923
924
925
927 The following exit values are returned:
928
929 0 Successful completion.
930
931
932 non-zero An error occurred.
933
934
936 /var/spool/lp/*
937
938
939 /etc/lp
940
941
942 /etc/lp/alerts/printer Fault handler for lpadmin
943
944
945 /etc/printers.conf System printer configuration database
946
947
949 See attributes(5) for descriptions of the following attributes:
950
951
952
953
954 ┌─────────────────────────────┬─────────────────────────────┐
955 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
956 ├─────────────────────────────┼─────────────────────────────┤
957 │Availability │SUNWpcu │
958 ├─────────────────────────────┼─────────────────────────────┤
959 │Interface Stability │Obsolete │
960 └─────────────────────────────┴─────────────────────────────┘
961
963 enable(1), lp(1), lpstat(1), mail(1), stty(1), accept(1M), lpforms(1M),
964 lpsched(1M), lpsystem(1M), ping(1M), dial(3NSL), terminfo(4),
965 attributes(5)
966
967
968
969
971 When using lpadmin to provide access to a remote printer, remote con‐
972 figuration data is stored in /etc/printers.conf. This data includes a
973 bsdaddr and a printer-uri-supported attribute. The data in this file
974 can be shared through the use of a network name service or replicated
975 across multiple systems. If the data is shared, it is important to make
976 sure that the bsdaddr and printer-uri-supported contain hostname infor‐
977 mation that is correctly resolved on all hosts sharing this data. Also,
978 the printer-uri-supported is the preferred means of accessing remote
979 print service. The bsdaddr is supplied for backward compatability with
980 Solaris 2.6-10 systems.
981
982
983
984SunOS 5.11 24 May 2006 lpadmin(1M)