Renaming an entry involves changing the relative distinguished name (RDN) of an entry. You cannot rename a RDN if it has children entries as this violates the LDAP protocol.

  • Use the ldapmodify tool to rename an entry. 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