1 .TH LDAPMODIFY 1 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools
22 .BI \-d \ debuglevel\fR]
30 .BI \-y \ passwdfile\fR]
34 .BI \-h \ ldaphost\fR]
36 .BI \-p \ ldapport\fR]
38 .BI \-P \ 2\fR\||\|\fI3\fR]
40 .BR \-O \ security-properties ]
72 .BI \-d \ debuglevel\fR]
80 .BI \-y \ passwdfile\fR]
82 .BI \-h \ ldaphost\fR]
84 .BI \-p \ ldapport\fR]
86 .BI \-P \ 2\fR\||\|\fI3\fR]
88 .BR \-O \ security-properties ]
100 .BI \-X \ authzid\fR]
109 is a shell-accessible interface to the
115 is implemented as a hard link to the ldapmodify tool. When invoked as
117 the -a (add new entry) flag is turned on automatically.
120 opens a connection to an LDAP server, binds, and modifies or adds entries.
121 The entry information is read from standard input or from \fIfile\fP through
122 the use of the -f option.
126 Add new entries. The default for
128 is to modify existing entries. If invoked as
130 this flag is always set.
133 Continuous operation mode. Errors are reported, but
135 will continue with modifications. The default is to exit after
139 Add or change records which where skipped due to an error are written to \fIfile\fP
140 and the error message returned by the server is added as a comment. Most useful in
144 Show what would be done, but don't actually modify entries. Useful for
145 debugging in conjunction with -v.
148 Use verbose mode, with many diagnostics written to standard output.
151 Force application of all changes regardless of the contents of input
152 lines that begin with
154 (by default, replica: lines are compared against the LDAP server host
155 and port in use to decide if a replog record should actually be applied).
158 Enable manage DSA IT control.
160 makes control critical.
163 Set the LDAP debugging level to \fIdebuglevel\fP.
165 must be compiled with LDAP_DEBUG defined for this option to have any effect.
168 Read the entry modification information from \fIfile\fP instead of from
172 Use simple authentication instead of SASL.
175 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
178 Prompt for simple authentication.
179 This is used instead of specifying the password on the command line.
182 Use \fIpasswd\fP as the password for simple authentication.
185 Use complete contents of \fIpasswdfile\fP as the password for
186 simple authentication.
189 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
190 fields are allowed; a list of URI, separated by whitespace or commas
194 Specify an alternate host on which the ldap server is running.
195 Deprecated in favor of -H.
198 Specify an alternate TCP port where the ldap server is listening.
199 Deprecated in favor of -H.
201 .BI \-P \ 2\fR\||\|\fI3
202 Specify the LDAP protocol version to use.
204 .BI \-O \ security-properties
205 Specify SASL security properties.
208 Enable SASL Interactive mode. Always prompt. Default is to prompt
212 Enable SASL Quiet mode. Never prompt.
215 Specify the authentication ID for SASL bind. The form of the ID
216 depends on the actual SASL mechanism used.
219 Specify the realm of authentication ID for SASL bind. The form of the realm
220 depends on the actual SASL mechanism used.
223 Specify the requested authorization ID for SASL bind.
225 must be one of the following formats:
227 .I <distinguished name>
233 Specify the SASL mechanism to be used for authentication. If it's not
234 specified, the program will choose the best mechanism the server knows.
237 Issue StartTLS (Transport Layer Security) extended operation. If you use
239 , the command will require the operation to be successful.
241 The contents of \fIfile\fP (or standard input if no \-f flag is given on
242 the command line) should conform to the format defined in
243 .BR slapd.replog (5),
244 with the exceptions noted below.
246 Lines that begin with "replica:" are matched against the LDAP server host
247 and port in use to decide if a particular replog record should be applied.
248 Any other lines that precede the "dn:" line are ignored.
249 The -F flag can be used to force
251 to apply all of the replog changes, regardless of the presence or
252 absence of any "replica:" lines.
254 If no "changetype:" line is present, the default is "add" if the -a
255 flag is set (or if the program was invoked as
257 and "modify" otherwise.
259 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
260 appear, the default is "replace" for
265 Note that the above exceptions to the
269 entries to be used as input to
274 Assuming that the file
276 exists and has the contents:
279 dn: cn=Modify Me,dc=example,dc=com
282 mail: modme@example.com
288 jpegPhoto:< file:///tmp/modme.jpeg
297 ldapmodify -f /tmp/entrymods
300 will replace the contents of the "Modify Me" entry's
302 attribute with the value "modme@example.com", add a
304 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
307 and completely remove the
311 Assuming that the file
313 exists and has the contents:
316 dn: cn=Barbara Jensen,dc=example,dc=com
321 title: the world's most famous mythical manager
322 mail: bjensen@example.com
328 ldapadd -f /tmp/newentry
331 will add a new entry for Babs Jensen, using the values from the
335 Assuming that the file
337 exists and has the contents:
340 dn: cn=Barbara Jensen,dc=example,dc=com
346 ldapmodify -f /tmp/entrymods
349 will remove Babs Jensen's entry.
351 Exit status is zero if no errors occur. Errors result in a non-zero
352 exit status and a diagnostic message being written to standard error.
366 The OpenLDAP Project <http://www.openldap.org/>
369 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
371 is derived from University of Michigan LDAP 3.3 Release.