Rename an entry by changing the relative distinguished name (RDN) of an entry.
Note:
You cannot rename an RDN if it has children entries because this violates the LDAP protocol.
Run the ldapmodify tool to rename an entry.
-
Run the
changetype
,newrdn
, anddeleteoldrdn
directives.
The following command changes uid=user.14 to
uid=user.2014 and uses the changetype
,
newrdn
, and deleteoldrdn
directives.
$ bin/ldapmodify
dn: uid=user.14,ou=People,dc=example,dc=com
changetype:moddn
newrdn: uid=user.2014
deleteoldrdn: 1