1 .TH LDAPMODIFY 1 "10 November 1998" "OpenLDAP LDVERSION"
3 ldapmodify, ldapadd \- ldap modify entry and ldap add entry tools
23 .BI \-d \ debuglevel\fR]
31 .BI \-h \ ldaphost\fR]
33 .BI \-p \ ldapport\fR]
35 .BI \-P \ 2\fR\||\|\fI3\fR]
55 .BI \-d \ debuglevel\fR]
61 .BI \-h \ ldaphost\fR]
63 .BI \-p \ ldapport\fR]
68 is a shell-accessible interface to the
74 is implemented as a hard link to the ldapmodify tool. When invoked as
76 the -a (add new entry) flag is turned on automatically.
79 opens a connection to an LDAP server, binds, and modifies or adds entries.
80 The entry information is read from standard input or from \fIfile\fP through
81 the use of the -f option.
85 Add new entries. The default for
87 is to modify existing entries. If invoked as
89 this flag is always set.
92 Assume that any values that start with a `/' are binary values and that
93 the actual value is in a file whose path is specified in the place where
94 values normally appear.
97 Continuous operation mode. Errors are reported, but
99 will continue with modifications. The default is to exit after
103 Replace existing values by default.
106 Show what would be done, but don't actually modify entries. Useful for
107 debugging in conjunction with -v.
110 Use verbose mode, with many diagnostics written to standard output.
113 Use Kerberos authentication instead of simple authentication. It is
114 assumed that you already have a valid ticket granting ticket. You must
115 compile with KERBEROS defined for this option to have any effect.
118 Same as \-k, but only does step 1 of the kerberos bind. This is useful
119 when connecting to a slapd and there is no x500dsa.hostname principal
120 registered with your kerberos servers.
123 Force application of all changes regardless of the contents of input
124 lines that begin with
126 (by default, replica: lines are compared against the LDAP server host
127 and port in use to decide if a replog record should actually be applied).
130 Enable manage DSA IT control.
132 makes control critical.
135 Set the LDAP debugging level to \fIdebuglevel\fP.
137 must be compiled with LDAP_DEBUG defined for this option to have any effect.
140 Read the entry modification information from \fIfile\fP instead of from
144 Use \fIbinddn\fP to bind to the LDAP directory. \fIbinddn\fP should be
145 a string-represented DN as defined in RFC 1779.
148 Prompt for simple authentication.
149 This is used instead of specifying the password on the command line.
152 Use \fIpasswd\fP as the password for simple authentication.
155 Specify an alternate host on which the ldap server is running.
158 Specify an alternate TCP port where the ldap server is listening.
160 .BI \-P \ 2\fR\||\|\fI3
161 Specify the LDAP protocol version to use.
163 The contents of \fIfile\fP (or standard input if no \-f flag is given on
164 the command line) should conform to the format defined in
165 .BR slapd.replog (5),
166 with the exceptions noted below.
168 If the first line of a record consists of a decimal number (entry id),
171 Lines that begin with "replica:" are matched against the LDAP server host
172 and port in use to decide if a particular replog record should be applied.
173 Any other lines that precede the "dn:" line are ignored.
174 The -F flag can be used to force
176 to apply all of the replog changes, regardless of the presence or
177 absence of any "replica:" lines.
179 If no "changetype:" line is present, the default is "add" if the -a
180 flag is set (or if the program was invoked as
182 and "modify" otherwise.
184 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
185 appear, the default is "replace" if the -r flag is set and "add"
188 Note that the above exceptions to the
192 entries to be used as input to
196 .SH ALTERNATIVE INPUT FORMAT
197 An alternative input format is supported for compatibility with older
200 This format consists of one or more entries separated by blank lines,
201 where each entry looks like:
204 Distinguished Name (DN)
209 where \fIattr\fP is the name of the attribute and \fIvalue\fP is the
212 By default, values are added. If the
215 given, the default is to replace existing values with the new one.
216 Note that it is permissible for a given attribute to appear more than
217 once (for example, to add more than one value for an attribute). Also
218 note that you can use a trailing `\\' to continue values across lines and
219 preserve newlines in the value itself (this is useful for modifying
220 QUIPU iattr attributes among others).
223 should be preceded by a \fB-\fP to remove a value. The `=' and
224 value should be omitted to remove an entire attribute.
227 should be preceded by a \fB+\fP to add a value in the presence of the
231 Assuming that the file
233 exists and has the contents:
236 dn: cn=Modify Me, o=University of Michigan, c=US
239 mail: modme@terminator.rs.itd.umich.edu
245 jpegPhoto: /tmp/modme.jpeg
254 ldapmodify -b -r -f /tmp/entrymods
257 will replace the contents of the "Modify Me" entry's
259 attribute with the value "modme@terminator.rs.itd.umich.edu", add a
261 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
264 and completely remove the
267 The same modifications as above can be performed using the older
272 cn=Modify Me, o=University of Michigan, c=US
273 mail=modme@terminator.rs.itd.umich.edu
275 +jpegPhoto=/tmp/modme.jpeg
282 ldapmodify -b -r -f /tmp/entrymods
285 Assuming that the file
287 exists and has the contents:
290 dn: cn=Barbara Jensen, o=University of Michigan, c=US
295 title: the world's most famous mythical manager
296 mail: bjensen@terminator.rs.itd.umich.edu
302 ldapadd -f /tmp/entrymods
305 will add a new entry for Babs Jensen, using the values from the
309 Assuming that the file
311 exists and has the contents:
314 dn: cn=Barbara Jensen, o=University of Michigan, c=US
320 ldapmodify -f /tmp/entrymods
323 will remove Babs Jensen's entry.
325 Exit status is 0 if no errors occur. Errors result in a non-zero exit
326 status and a diagnostic message being written to standard error.
341 .IR "A String Representation of Distinguished Names",
344 ISODE Consortium, March 1995.
346 There is no interactive mode, but there probably should be.
349 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
351 is derived from University of Michigan LDAP 3.3 Release.