ldapmodrdn opens a connection to an LDAP server, binds, and modifies the RDN of entries. The entry information is read from standard input, from file through the use of the -f option, or from the command-line pair dn and rdn.
Remove old RDN values from the entry. By default, old values are kept.
Show what would be done, but don't actually change entries. Useful in conjunction with -v for debugging.
Use verbose mode, with diagnostics written to standard output.
Continuous operation mode. Errors are reported, but ldapmodify continues with modifications. The default is to exit after reporting an error.
To request more than one category of debugging information, add the masks. For example, to request trace and filter information, specify a debuglevel of 33.
Read the entry modification information from file instead of from standard input or the command-line.
Use the distinguished name binddn to bind to the directory.
Use passwd as the password for authentication to the directory.
Specify an alternate host on which the slapd server is running.
Specifies the authentication mechanism used to bind to the directory. This option can have the value CRAM-MD5. The bind DN and bind password are mandatory with this option.
Specify an alternate TCP port where the slapd server is listening.
If the command-line arguments dn and rdn are given, rdn replaces the RDN of the entry specified by the DN, dn.
Otherwise, the contents of file (or standard input if the - f option is not specified) must consist of one or more pair of lines:
Distinguished Name (DN) Relative Distinguished Name (RDN)
Use one or more blank lines to separate each DN/RDN pair.
The file /tmp/entrymods contains:
cn=Modify Me, o=XYZ, c=US cn=The New Me
example% ldapmodify -r -f /tmp/entrymods
changes the RDN of the "Modify Me" entry from "Modify Me" to "The New Me" and the old cn, "Modify Me" is removed.
See attributes(5) for a description of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.