It 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.
binddn should be a string-represented DN, as defined in RFC 1779 or its successor.
If a -D binddn option is not supplied, the command will take the binddn value from the LDAP_BINDDN_CHANGE environmental variable, if set. If LDAP_BINDDN_CHANGE specifies a null string, it is assumed that an anonymous bind is required.
If a -D option is not supplied, and LDAP_BINDDN_CHANGE is not used to specify the bind DN, the configuration file /etc/ldap_defaults will be examined for a default value to be used. If no default is supplied, a value of "" will be assumed.
The password is prompted for in a non-echoing input mode. If ldapmodrdn has no controlling terminal, then the password will be read from standard input.
More than one server can be specified, in which case the servers are tried in the order specified, stopping with the first one to which a successful connection is made.
The servers can be specified either as hostnames or as dotted strings giving IP addresses.
A server port may be specified along with the server names or addresses by using the notation servername:portnumber or serverIPaddr:portnumber. If a port number is not explicitly specified for the particular server, a default port (as described for the -p option) is used.
If a null string is supplied, the local host is assumed. See the -p option for how the local port is selected.
If no -h option is supplied, the command will take the ldaphost value from the LDAP_HOST environmental variable, if this is present.
If no -h option is supplied, and LDAP_HOST is not set, then the configuration file /etc/ldap_defaults will be examined for a default value to be used.
If no default is supplied, a value of "", implying the local host, will be assumed.
If no port number is explicitly supplied, the default LDAP port is assumed.
Otherwise, the contents of file (or standard input if no -f option is given) should consist of one or more entries.
Distinguished Name (DN) Relative Distinguished Name (RDN)One or more blank lines may be used to separate each DN/RDN pair.
cn=Modify Me, o=University of Michigan, c=US cn=The New MeIn that case, the following command will change the RDN of the ``Modify Me'' entry from ``Modify Me'' to ``The New Me'' and the old cn, ``Modify Me'' will be removed:
Kille, S., A String Representation of Distinguished Names, RFC 1779, ISODE Consortium, March 1995.