1 .TH LDAPMODIFY 1 "20 August 2000" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools
30 .BI \-d \ debuglevel\fR]
40 .BI \-h \ ldaphost\fR]
42 .BI \-p \ ldapport\fR]
44 .BI \-P \ 2\fR\||\|\fI3\fR]
46 .BR \-O \ security-properties ]
52 .BI \-U \ username\fR]
84 .BI \-d \ debuglevel\fR]
92 .BI \-h \ ldaphost\fR]
94 .BI \-p \ ldapport\fR]
96 .BI \-P \ 2\fR\||\|\fI3\fR]
102 .BI \-U \ username\fR]
104 .BI \-X \ authzid\fR]
113 is a shell-accessible interface to the
119 is implemented as a hard link to the ldapmodify tool. When invoked as
121 the -a (add new entry) flag is turned on automatically.
124 opens a connection to an LDAP server, binds, and modifies or adds entries.
125 The entry information is read from standard input or from \fIfile\fP through
126 the use of the -f option.
130 Add new entries. The default for
132 is to modify existing entries. If invoked as
134 this flag is always set.
137 Assume that any values that start with a `/' are binary values and that
138 the actual value is in a file whose path is specified in the place where
139 values normally appear.
142 Automatically chase referrals.
145 Continuous operation mode. Errors are reported, but
147 will continue with modifications. The default is to exit after
151 Replace existing values by default.
154 Show what would be done, but don't actually modify entries. Useful for
155 debugging in conjunction with -v.
158 Use verbose mode, with many diagnostics written to standard output.
161 Use Kerberos authentication instead of simple authentication. It is
162 assumed that you already have a valid ticket granting ticket. You must
163 compile with Kerberos support for this option to have any effect.
166 Same as \-k, but only does step 1 of the Kerberos bind. This is useful
167 when connecting to a slapd and there is no x500dsa.hostname principal
168 registered with your Kerberos servers.
171 Force application of all changes regardless of the contents of input
172 lines that begin with
174 (by default, replica: lines are compared against the LDAP server host
175 and port in use to decide if a replog record should actually be applied).
178 Enable manage DSA IT control.
180 makes control critical.
183 Set the LDAP debugging level to \fIdebuglevel\fP.
185 must be compiled with LDAP_DEBUG defined for this option to have any effect.
188 Read the entry modification information from \fIfile\fP instead of from
192 Use simple authentication instead of SASL.
195 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
198 Prompt for simple authentication.
199 This is used instead of specifying the password on the command line.
202 Use \fIpasswd\fP as the password for simple authentication.
205 Specify URI(s) referring to the ldap server(s).
208 Specify an alternate host on which the ldap server is running.
209 Deprecated in favor of -H.
212 Specify an alternate TCP port where the ldap server is listening.
213 Deprecated in favor of -H.
215 .BI \-P \ 2\fR\||\|\fI3
216 Specify the LDAP protocol version to use.
218 .BI \-O \ security-properties
219 Specify SASL security properties.
222 Enable SASL Interactive mode. Always prompt. Default is to prompt
226 Enable SASL Quiet mode. Never prompt.
229 Specify the username for SASL bind. The syntax of the username depends on the
230 actual SASL mechanism used.
233 Specify the requested authorization ID for SASL bind.
235 must be one of the following formats:
237 .I <distinguished name>
243 Specify the SASL mechanism to be used for authentication. If it's not
244 specified, the program will choose the best mechanism the server knows.
247 Issue StartTLS (Transport Layer Security) extended operation. If you use
249 , the command will require the operation to be successful.
251 The contents of \fIfile\fP (or standard input if no \-f flag is given on
252 the command line) should conform to the format defined in
253 .BR slapd.replog (5),
254 with the exceptions noted below.
256 Lines that begin with "replica:" are matched against the LDAP server host
257 and port in use to decide if a particular replog record should be applied.
258 Any other lines that precede the "dn:" line are ignored.
259 The -F flag can be used to force
261 to apply all of the replog changes, regardless of the presence or
262 absence of any "replica:" lines.
264 If no "changetype:" line is present, the default is "add" if the -a
265 flag is set (or if the program was invoked as
267 and "modify" otherwise.
269 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
270 appear, the default is "replace" if the -r flag is set and "add"
273 Note that the above exceptions to the
277 entries to be used as input to
282 Assuming that the file
284 exists and has the contents:
287 dn: cn=Modify Me, dc=example, dc=com
290 mail: modme@OpenLDAP.org
296 jpegPhoto:< file://tmp/modme.jpeg
305 ldapmodify -b -r -f /tmp/entrymods
308 will replace the contents of the "Modify Me" entry's
310 attribute with the value "modme@example.com", add a
312 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
315 and completely remove the
319 Assuming that the file
321 exists and has the contents:
324 dn: cn=Barbara Jensen, dc=example, dc=com
329 title: the world's most famous mythical manager
330 mail: bjensen@example.com
336 ldapadd -f /tmp/entrymods
339 will add a new entry for Babs Jensen, using the values from the
343 Assuming that the file
345 exists and has the contents:
348 dn: cn=Barbara Jensen, dc=example, dc=com
354 ldapmodify -f /tmp/entrymods
357 will remove Babs Jensen's entry.
359 Exit status is zero if no errors occur. Errors result in a non-zero
360 exit status and a diagnostic message being written to standard error.
374 There is no interactive mode, but there probably should be.
376 The OpenLDAP Project <http://www.openldap.org/>
379 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
381 is derived from University of Michigan LDAP 3.3 Release.