1printers.conf(4) File Formats printers.conf(4)
2
3
4
6 printers.conf - system printing configuration database
7
9 /etc/printers.conf
10
11
12 LDAP
13 ou=printers
14
15
16 NIS
17 printers.conf.byname
18
19
20 NIS+
21 printers.org_dir
22
23
25 The printers.conf file is the system printing configuration database.
26 System administrators use printers.conf to describe destinations for
27 the print client commands and the print protocol adaptor. A destination
28 names a printer or class of printers. See lpadmin(1M). The LP print
29 spooler uses private LP configuration data for represented in the
30 printers.conf database.
31
32
33 The lpset command can be used to define the printer table in NIS+. It
34 checks to see if the NIS+ table (printers.org_dir) exists and if it
35 does not it goes ahead and creates it in the correct format. See
36 lpset(1M) for more information.
37
38 Entries
39 Each entry in printers.conf describes one destination. Entries are one
40 line consisting of any number of fields separated by colons (`:') and
41 terminated by a NEWLINE. The first field of each entry specifies the
42 name of the destination and aliases to which the entry describes. Spec‐
43 ify one or more names or aliases of the destination in this first
44 field. Specify the destination using atomic names. URI-style and POSIX-
45 style names are not acceptable. See standards(5). Separate destination
46 names by pipe signs (`|').
47
48
49 Two destination names are reserved for special use in the first entry.
50 Use _all to specify the interest list for lpget, lpstat, and cancel.
51 Use _default to specify the default destination.
52
53
54 The remaining fields in an entry are key=value pairs. See Specifying
55 Configuration Options for details regarding key=value pairs.
56
57
58 Empty lines can be included for readability. Entries can continue on to
59 multiple lines by adding a backslash (`\') as the last character in the
60 line. printers.conf can include comments. Comments have a pound sign
61 (`#') as the first character in the line, and are terminated by a NEW‐
62 LINE. Use the lpset command to create or modify printers.conf. See
63 lpset(1M). Do not make changes in printers.conf by using an editor.
64
65 Specifying Configuration Options
66 key=value pairs are configuration options defined by the system admin‐
67 istrator. key and value can be of arbitrary length. Separate key and
68 value by the equal (`=') character.
69
70 Client/Server Configuration Options
71 The following client/server configuration options (represented as
72 key=value pairs) are supported:
73
74 printer-uri-supported=scheme://endpoint
75
76 Provides the information necessary to contact the print service for
77 the entry. The scheme generally identifies the print service or
78 protocol to use. Currently this is limited to lpsched, ipp, and lpd
79 but might be expanded in the future. Each of these schemes imposes
80 a set of restrictions for specifying the endpoint and the function‐
81 ality provided.
82
83 lpsched://localhost/printers/queue
84
85 This is URI form is used for print queues that are configured
86 under the local LP service.
87
88
89 ipp://server[:port]/printers/queue
90 http://server:631/printers/queue
91 ipp://server[:port]/...
92
93 This URI form is used for print queues that are remotely acces‐
94 sible by way of the Internet Print Protocol. This protocol is
95 the preferred method of accessing remote print queues because
96 it provides the greatest functionality over the wire. The ipp
97 uri scheme is specified in the internet print protocol specifi‐
98 cations and is much more free form than listed above. The
99 actual content and format of the endpoint is determined by the
100 remote print service.
101
102
103 lpd://server/printers/queue[#Solaris]
104
105 This URI form is used for print queues that are remotely
106 accessable by way of the BSD Print Protocol. Though limited in
107 capability, this protocol is widely used between client and
108 server. It provides maximium interoperability with remote print
109 services. When used to communicate with print services on a
110 Solaris print server, the optional #Solaris component of the
111 URI indicates that Solaris protcol extensions can be used dur‐
112 ing print job submission.
113
114 If an entry does not contain a printer-uri-supported key/value
115 pair, the bsdaddr value is converted to its equivalent uri form and
116 a printer-uri-supported key/value pair is added to the resulting
117 data returned to applications requesting printer configuration
118 data.
119
120
121 bsdaddr=server,destination[,Solaris]
122
123 Sets the server and destination name. Sets if the client generates
124 protocol extensions for use with the lp command (see lp(1)).
125 Solaris specifies a Solaris print server extension. If Solaris is
126 not specified, no protocol extensions are generated. server is the
127 name of the host containing the queue for destination. destination
128 is the atomic name by which the server knows the destination. If
129 the configuration file contents are to be shared with legacy sys‐
130 tems (Solaris 2.6 - Solaris 10), this key/value pair should be pro‐
131 vided for backward compatability.
132
133
134 use=destination
135
136 Sets the destination to continue searching for configuration infor‐
137 mation. destination is an atomic, URI-style (scheme://endpoint), or
138 Posix-style name (server:printer).
139
140
141 all=destination_list
142
143 Sets the interest list for the lpget, lpstat, and cancel commands.
144 destination_list is a comma-separated list of destinations. Specify
145 destination using atomic, URI-style (scheme://endpoint), or Posix-
146 style names (server:printer). See lpget(1M), lpstat(1), and can‐
147 cel(1).
148
149
150 LP Server Options
151 The following LP configuration options (represented as key=value pairs)
152 are supported:
153
154 user-equivalence=true|false
155
156 Sets whether or not usernames are considered equivalent when can‐
157 celling a print request submitted from a different host in a net‐
158 worked environment. true means that usernames are considered equiv‐
159 alent, and permits users to cancel a print requests submitted from
160 a different host. user-equivalence is set to false by default.
161 false means that usernames are not considered equivalent, and does
162 not permit users cancel a print request submitted from a different
163 host. If user-equivalence is set to false, print requests can only
164 be cancelled by the users on the host on whichs the print prequest
165 was generated or by the superuser on the print server.
166
167
168 Print Queue Name Resolution
169 Applications needing to resolve print queue names (destinations) to the
170 associated print service and communications endpoint make use of a spe‐
171 cific name resolution ordering. Destination names in URI and POSIX form
172 are complete unto themselves and require no further resolution. Names
173 in atomic form are resolved based on the printers database entry in the
174 /etc/nsswitch.conf file. See nsswitch.conf(4)
175
176 Locating the Personal Default Destination
177 The default destination is located differently depending on the com‐
178 mand.
179
180
181 The lp command locates the default destination in the following order:
182
183 1. lp command's -d destination option.
184
185 2. LPDEST environment variable.
186
187 3. PRINTER environment variable.
188
189 4. _default destination in $HOME/.printers.
190
191 5. _default destination in /etc/printers.conf.
192
193
194 The lpr, lpq, and lprm commands locate the default destination in the
195 following order:
196
197 1. lpr command's -P destination option.
198
199 2. PRINTER environment variable.
200
201 3. LPDEST environment variable.
202
203 4. _default destination in $HOME/.printers.
204
205 5. _default destination in /etc/printers.conf.
206
207 Locating the Interest List for lpstat, lpget, and cancel
208 The lpget, lpstat, and cancel commands locate the interest list in the
209 following order:
210
211 1. _all list in $HOME/.printers.
212
213 2. _all list in /etc/printers.conf.
214
216 Example 1 Setting the Interest List
217
218
219 The following entry sets the interest list for the lpget, lpstat and
220 cancel commands to printer1, printer2 and printer3:
221
222
223 _all:all=printer1,printer2,printer3
224
225
226
227 Example 2 Setting the Server Name
228
229
230 The following entry sets the server name to server and and printer name
231 to ps_printer for destinations printer1 and ps. It does not generate
232 BSD protocol extensions.
233
234
235 printer1|ps:bsdaddr=server,ps_printer
236
237
238
239 Example 3 Setting Server Name and Destination Name
240
241
242 The following entry sets the server name to server and destination name
243 to pcl_printer, for destination printer2. It also generates Solaris
244 protocol extensions.
245
246
247 printer2:printer-uri-supported=lpd//server/printers/pcl_printer#Solaris
248
249
250
251 Example 4 Setting Server Name and Destination Name with Continuous
252 Search
253
254
255 The following entry sets the server name to server and destination name
256 to new_printer, for destination printer3. It also sets the printer3 to
257 continue searching for configuration information to printer
258 another_printer.
259
260
261 printer3:bsdaddr=server,new_printer:use=another_printer
262
263
264
265 Example 5 Setting Default Destination
266
267
268 The following entry sets the default destination to continue searching
269 for configuration information to destination printer1.
270
271
272 _default:use=printer1
273
274
275
276 Example 6 Using IPP as the URI
277
278
279 The following example uses IPP as the URI:
280
281
282 printer4:printer-uri-supported=ipp\://server/printers/queue
283
284
285
287 /etc/printers.conf System configuration database
288
289
290 $HOME/.printers User-configurable printer database
291
292
293 ou=printers LDAP version of /etc/printers.conf
294
295
296 printers.conf.byname (NIS) NIS version of /etc/printers.conf
297
298
299 printers.org_dir (NIS+) NIS+ version of /etc/printers.conf
300
301
303 See attributes(5) for descriptions of the following attributes:
304
305
306
307
308 ┌─────────────────────────────┬─────────────────────────────┐
309 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
310 ├─────────────────────────────┼─────────────────────────────┤
311 │Availability │SUNWpcu │
312 ├─────────────────────────────┼─────────────────────────────┤
313 │Stability Level │Stable │
314 └─────────────────────────────┴─────────────────────────────┘
315
317 cancel(1), enable(1), enable(1), lp(1), lpq(1B), lpr(1B), lprm(1B),
318 lpstat(1), accept(1M), in.lpd(1M), lpadmin(1M), lpget(1M), lpmove(1M),
319 lpset(1M), accept(1M), nsswitch.conf(4), printers(4), attributes(5),
320 standards(5)
321
322
323 System Administration Guide: Basic Administration
324
325
326
327SunOS 5.11 2 Jun 2006 printers.conf(4)