1 .TH LDAPMODIFY 1 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2008 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]
84 .BI \-h \ ldaphost\fR]
86 .BI \-p \ ldapport\fR]
88 .BI \-P \ 2\fR\||\|\fI3\fR]
90 .BR \-O \ security-properties ]
102 .BI \-X \ authzid\fR]
111 is a shell-accessible interface to the
112 .BR ldap_add_ext (3),
113 .BR ldap_modify_ext (3),
114 .BR ldap_delete_ext (3)
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 Continuous operation mode. Errors are reported, but
139 will continue with modifications. The default is to exit after
143 Add or change records which where skipped due to an error are written to \fIfile\fP
144 and the error message returned by the server is added as a comment. Most useful in
148 Show what would be done, but don't actually modify entries. Useful for
149 debugging in conjunction with -v.
152 Use verbose mode, with many diagnostics written to standard output.
155 Force application of all changes regardless of the contents of input
156 lines that begin with
158 (by default, replica: lines are compared against the LDAP server host
159 and port in use to decide if a replog record should actually be applied).
162 Enable manage DSA IT control.
164 makes control critical.
167 Set the LDAP debugging level to \fIdebuglevel\fP.
169 must be compiled with LDAP_DEBUG defined for this option to have any effect.
172 Read the entry modification information from \fIfile\fP instead of from
176 Use simple authentication instead of SASL.
179 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
182 Prompt for simple authentication.
183 This is used instead of specifying the password on the command line.
186 Use \fIpasswd\fP as the password for simple authentication.
189 Use complete contents of \fIpasswdfile\fP as the password for
190 simple authentication.
193 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
194 fields are allowed; a list of URI, separated by whitespace or commas
198 Specify an alternate host on which the ldap server is running.
199 Deprecated in favor of -H.
202 Specify an alternate TCP port where the ldap server is listening.
203 Deprecated in favor of -H.
205 .BI \-P \ 2\fR\||\|\fI3
206 Specify the LDAP protocol version to use.
208 .BI \-O \ security-properties
209 Specify SASL security properties.
212 Enable SASL Interactive mode. Always prompt. Default is to prompt
216 Enable SASL Quiet mode. Never prompt.
219 Specify the authentication ID for SASL bind. The form of the ID
220 depends on the actual SASL mechanism used.
223 Specify the realm of authentication ID for SASL bind. The form of the realm
224 depends on the actual SASL mechanism used.
227 Specify the requested authorization ID for SASL bind.
229 must be one of the following formats:
231 .I <distinguished name>
237 Specify the SASL mechanism to be used for authentication. If it's not
238 specified, the program will choose the best mechanism the server knows.
241 Issue StartTLS (Transport Layer Security) extended operation. If you use
243 , the command will require the operation to be successful.
245 The contents of \fIfile\fP (or standard input if no \-f flag is given on
246 the command line) must conform to the format defined in
248 (LDIF as defined RFC 2849).
250 Assuming that the file
252 exists and has the contents:
255 dn: cn=Modify Me,dc=example,dc=com
258 mail: modme@example.com
264 jpegPhoto:< file:///tmp/modme.jpeg
273 ldapmodify -f /tmp/entrymods
276 will replace the contents of the "Modify Me" entry's
278 attribute with the value "modme@example.com", add a
280 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
283 and completely remove the
287 Assuming that the file
289 exists and has the contents:
292 dn: cn=Barbara Jensen,dc=example,dc=com
297 title: the world's most famous mythical manager
298 mail: bjensen@example.com
305 ldapadd -f /tmp/newentry
308 will add a new entry for Babs Jensen, using the values from the
312 Assuming that the file
314 exists and has the contents:
317 dn: cn=Barbara Jensen,dc=example,dc=com
324 ldapmodify -f /tmp/entrymods
327 will remove Babs Jensen's entry.
329 Exit status is zero if no errors occur. Errors result in a non-zero
330 exit status and a diagnostic message being written to standard error.
338 .BR ldap_add_ext (3),
339 .BR ldap_delete_ext (3),
340 .BR ldap_modify_ext (3),
341 .BR ldap_modrdn_ext (3),
345 The OpenLDAP Project <http://www.openldap.org/>