1lpset(1M) System Administration Commands lpset(1M)
2
3
4
6 lpset - set printing configuration in /etc/printers.conf or other sup‐
7 ported databases
8
10 lpset [-n system | nisplus | fnsldap] [-x]
11 [ [-D binddn] [-w passwd] [-h ldaphost]]
12 [-a key=value] [-d key] destination
13
14
16 The lpset utility sets printing configuration information in the sys‐
17 tem configuration databases. Use lpset to create and update printing
18 configuration in /etc/printers.conf, or printers.org_dir (NIS+). See
19 nsswitch.conf(4) and printers.conf(4).
20
21
22 Only a superuser or a member of Group 14 may execute lpset.
23
25 The following options are supported:
26
27 -n system|nisplus|ldap Create or update the configuration informa‐
28 tion for the destination entry in
29 /etc/printers.conf, printers.org_dir (NIS+),
30 or LDAP printer contexts. system specifies
31 that the information is created or updated in
32 /etc/printers.conf. nisplus specifies that
33 the information is created or updated in the
34 printers.org_dir NIS+ table. ldap specifies
35 that the information is written to an LDAP
36 server. See .
37
38 If -n is not specified, system is the
39 default.
40
41
42 -x Remove all configuration for the destination
43 entry from the database specified by the -n
44 option.
45
46
47 -a key=value Configure the specified key=value pair for
48 the destination. See printers.conf(4) for
49 information regarding the specification of
50 key=value pairs.
51
52
53 -d key Delete the configuration option specified by
54 key for the destination entry. See print‐
55 ers.conf(4) for information regarding the
56 specification of key and key=value pairs.
57
58
59 -D binddn Use the distinguished name (DN) binddn to
60 bind to the LDAP directory server.
61
62
63 -w passwd Use passwd as the password for authentication
64 to the LDAP directory server.
65
66
67 -h ldaphost Specify an alternate host on which the LDAP
68 server is running. This option is only used
69 when ldap is specified as the naming service.
70 If this option is not specified, the default
71 is the current host system.
72
73
75 The following operand is supported:
76
77 destination Specifies the entry in /etc/printers.conf, print‐
78 ers.org_dir, or LDAP, in which to create or modify
79 information. destination names a printer of class of
80 printers. See lpadmin(1M). Each entry in printers.conf
81 describes one destination. Specify destination using
82 atomic names. POSIX-style destination names are not
83 acceptable. See printers.conf(4) for information regard‐
84 ing the naming conventions for atomic names and stan‐
85 dards(5) for information regarding POSIX.
86
87
89 Example 1 Removing All Existing Printing Configuration Information
90
91
92 The following example removes all existing printing configuration
93 information for destination dogs from /etc/printers.conf:
94
95
96 example% lpset -x dogs
97
98
99
100 Example 2 Setting a key=value Pair
101
102
103 The following example sets the user-equivalence =true key=value pair
104 for destination tabloid in the NIS+ context:
105
106
107 example% lpset -n nisplus -a user-equivalence=true tabloid
108
109
110
111 Example 3 Setting a key=value Pair in LDAP
112
113 example% lpset -n ldap -h ldapl.xyz.com -D "cn=Directory Manager" \
114 -w passwd -a key1=value1 printer1
115
116
117
119 The following exit values are returned:
120
121 0 Successful completion.
122
123
124 non-zero An error occurred.
125
126
128 /etc/printers.conf System configuration database.
129
130
131 printer.org_dir (NIS+) NIS+ version of /etc/printers.conf.
132
133
135 See attributes(5) for descriptions of the following attributes:
136
137
138
139
140 ┌─────────────────────────────┬─────────────────────────────┐
141 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
142 ├─────────────────────────────┼─────────────────────────────┤
143 │Availability │SUNWpcu │
144 ├─────────────────────────────┼─────────────────────────────┤
145 │Stability Level │Stable │
146 └─────────────────────────────┴─────────────────────────────┘
147
149 ldap(1), lp(1), lpc(1B), lpq(1B), lpr(1B), lpstat(1), ldapclient(1M),
150 lpadmin(1M), lpget(1M), nsswitch.conf(4), printers(4), print‐
151 ers.conf(4), attributes(5), standards(5)
152
153
154
155
157 If the ldap database is used, the printer administrator should be mind‐
158 ful of the following when updating printer information.
159
160 1. Because the domain information for the printer being updated
161 is extracted from the ldapclient(1M) configuration, the LDAP
162 server being updated must host the same domain that is used
163 by the current ldapclient(1M) server.
164
165 2. If the LDAP server being updated is a replica LDAP server,
166 the updates will be referred to the master LDAP server and
167 completed there. The updates might be out of sync and not
168 appear immediatedly, as the replica server may not have been
169 updated by the master server. For example, a printer that
170 you deleted by using lpset may still appear in the printer
171 list you display with lpget until the replica is updated
172 from the master. Replica servers vary as to how often they
173 are updated from the master. See System Administration
174 Guide: Solaris Printing for information on LDAP server
175 replication.
176
177 3. Although users can use the LDAP command line utilities lda‐
178 padd(1) and ldapmodify(1) to update printer entries in the
179 directory, the preferred method is to use lpset. Otherwise,
180 if the ldapadd and ldapmodify utilities are used, the admin‐
181 istrator must ensure that the printer-name attribute value
182 is unique within the ou=printers container on the LDAP
183 server. If the value is not unique, the result of modifica‐
184 tions done using lpset or the Solaris Print Manager, print‐
185 mgr(1M) may be unpredictable.
186
187
188
189SunOS 5.11 23 May 2003 lpset(1M)