1lpadmin(8) OpenPrinting lpadmin(8)
2
3
4
6 lpadmin - configure cups printers and classes
7
9 lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -d destination
10 lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -p destination [ -R
11 name-default ] option(s)
12 lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -x destination
13
15 lpadmin configures printer and class queues provided by CUPS. It can
16 also be used to set the server default printer or class.
17
18 When specified before the -d, -p, or -x options, the -E option forces
19 encryption when connecting to the server.
20
21 The first form of the command (-d) sets the default printer or class to
22 destination. Subsequent print jobs submitted via the lp(1) or lpr(1)
23 commands will use this destination unless the user specifies otherwise
24 with the lpoptions(1) command.
25
26 The second form of the command (-p) configures the named printer or
27 class. The additional options are described below.
28
29 The third form of the command (-x) deletes the printer or class desti‐
30 nation. Any jobs that are pending for the destination will be removed
31 and any job that is currently printed will be aborted.
32
34 The following options are recognized when configuring a printer queue:
35
36 -c class
37 Adds the named printer to class. If class does not exist it is
38 created automatically.
39
40 -m model
41 Sets a standard PPD file for the printer from the model directory
42 or using one of the driver interfaces. Use the -m option with the
43 lpinfo(8) command to get a list of supported models. The model
44 "raw" clears any existing PPD file and the model "everywhere"
45 queries the printer referred to by the specified IPP device-uri.
46 Note: Models other than "everywhere" are deprecated and will not
47 be supported in a future version of CUPS.
48
49 -o cupsIPPSupplies=true
50
51 -o cupsIPPSupplies=false
52 Specifies whether IPP supply level values should be reported.
53
54 -o cupsSNMPSupplies=true
55
56 -o cupsSNMPSupplies=false
57 Specifies whether SNMP supply level (RFC 3805) values should be
58 reported.
59
60 -o job-k-limit=value
61 Sets the kilobyte limit for per-user quotas. The value is an in‐
62 teger number of kilobytes; one kilobyte is 1024 bytes.
63
64 -o job-page-limit=value
65 Sets the page limit for per-user quotas. The value is the integer
66 number of pages that can be printed; double-sided pages are
67 counted as two pages.
68
69 -o job-quota-period=value
70 Sets the accounting period for per-user quotas. The value is an
71 integer number of seconds; 86,400 seconds are in one day.
72
73 -o job-sheets-default=banner
74
75 -o job-sheets-default=banner,banner
76 Sets the default banner page(s) to use for print jobs.
77
78 -o name=value
79 Sets a PPD option for the printer. PPD options can be listed us‐
80 ing the -l option with the lpoptions(1) command.
81
82 -o name-default=value
83 Sets a default server-side option for the destination. Any print-
84 time option can be defaulted, e.g., "-o number-up-default=2" to
85 set the default "number-up" option value to 2.
86
87 -o port-monitor=name
88 Sets the binary communications program to use when printing,
89 "none", "bcp", or "tbcp". The default program is "none". The
90 specified port monitor must be listed in the printer's PPD file.
91
92 -o printer-error-policy=name
93 Sets the policy for errors such as printers that cannot be found
94 or accessed, don't support the format being printed, fail during
95 submission of the print data, or cause one or more filters to
96 crash. The name must be one of "abort-job" (abort the job on er‐
97 ror), "retry-job" (retry the job at a future time), "retry-cur‐
98 rent-job" (retry the current job immediately), or "stop-printer"
99 (stop the printer on error). The default error policy is "stop-
100 printer" for printers and "retry-current-job" for classes.
101
102 -o printer-is-shared=true
103
104 -o printer-is-shared=false
105 Sets the destination to shared/published or unshared/unpublished.
106 Shared/published destinations are publicly announced by the server
107 on the LAN based on the browsing configuration in cupsd.conf,
108 while unshared/unpublished destinations are not announced. The
109 default value is "true".
110
111 -o printer-op-policy=name
112 Sets the IPP operation policy associated with the destination.
113 The name must be defined in the cupsd.conf in a Policy section.
114 The default operation policy is "default".
115
116 -R name-default
117 Deletes the named option from printer.
118
119 -r class
120 Removes the named printer from class. If the resulting class be‐
121 comes empty it is removed.
122
123 -u allow:{user|@group}{,user|,@group}*
124
125 -u deny:{user|@group}{,user|,@group}*
126
127 -u allow:all
128
129 -u deny:none
130 Sets user-level access control on a destination. Names starting
131 with "@" are interpreted as UNIX groups. The latter two forms
132 turn user-level access control off. Note: The user 'root' is not
133 granted special access - using "-u allow:foo,bar" will allow users
134 'foo' and 'bar' to access the printer but NOT 'root'.
135
136 -v "device-uri"
137 Sets the device-uri attribute of the printer queue. Use the -v
138 option with the lpinfo(8) command to get a list of supported de‐
139 vice URIs and schemes.
140
141 -D "info"
142 Provides a textual description of the destination.
143
144 -E When specified before the -d, -p, or -x options, forces the use of
145 TLS encryption on the connection to the scheduler. Otherwise, en‐
146 ables the destination and accepts jobs; this is the same as run‐
147 ning the cupsaccept(8) and cupsenable(8) programs on the destina‐
148 tion.
149
150 -L "location"
151 Provides a textual location of the destination.
152
154 The following lpadmin options are deprecated:
155
156 -i filename
157 This option historically has been used to provide either a System
158 V interface script or (as an implementation side-effect) a PPD
159 file. Note: Interface scripts are not supported by CUPS. PPD
160 files and printer drivers are deprecated and will not be supported
161 in a future version of CUPS.
162
163 -P ppd-file
164 Specifies a PostScript Printer Description (PPD) file to use with
165 the printer. Note: PPD files and printer drivers are deprecated
166 and will not be supported in a future version of CUPS.
167
169 Unlike the System V printing system, CUPS allows printer names to con‐
170 tain any printable character except SPACE, TAB, "/", or "#". Also,
171 printer and class names are not case-sensitive.
172
173 Finally, the CUPS version of lpadmin may ask the user for an access
174 password depending on the printing system configuration. This differs
175 from the System V version which requires the root user to execute this
176 command.
177
179 CUPS printer drivers and backends are deprecated and will no longer be
180 supported in a future feature release of CUPS. Printers that do not
181 support IPP can be supported using applications such as
182 ippeveprinter(1).
183
184 The CUPS version of lpadmin does not support all of the System V or So‐
185 laris printing system configuration options.
186
187 Interface scripts are not supported for security reasons.
188
189 The double meaning of the -E option is an unfortunate historical odd‐
190 ity.
191
192 The lpadmin command communicates with the scheduler (cupsd) to make
193 changes to the printing system configuration. This configuration in‐
194 formation is stored in several files including printers.conf and
195 classes.conf. These files should not be edited directly and are an im‐
196 plementation detail of CUPS that is subject to change at any time.
197
199 Create an IPP Everywhere print queue:
200
201 lpadmin -p myprinter -E -v ipp://myprinter.local/ipp/print -m everywhere
202
203
205 cupsaccept(8), cupsenable(8), lpinfo(8), lpoptions(1), CUPS Online Help
206 (http://localhost:631/help)
207
209 Copyright © 2021-2023 by OpenPrinting.
210
211
212
2132021-02-28 CUPS lpadmin(8)