!!! Overview[1] [{$pagename}] is a [LDIF] directive (or [moddn]) is used to change the [RDN] of the [LDAP Entry] (rename or copy the entry) defined by the preceding dn: directive. [{$pagename}] is the [LDIF] changeType directive for [ModifyDNRequest]. [{$pagename}] __MUST__ be followed by a [NewRDN] directive and may be followed by a [DeleteOldRDN] and a [NewSuperior] directive. Typically depending on the [LDAP Server Implementation] you __CANNOT__ rename the [LDAP Entry] if the entry has one or more child entries. !! [LDIF] [Examples] for [{$pagename}]: %%prettify {{{ dn: cn=Robert Ssmith,ou=people,dc=example,dc=com # following sequence renames the above DN to # cn=Robert Smith,ou=people.dc=example,dc=com # and deletes the entry # cn=Robert Ssmith,ou=people,dc=example,dc=com changetype: modrdn newrdn: cn=Robert Smith deleteoldrdn: 1 }}} /% Here are the keywords and descriptions: * [NewRDN] * [DeleteOldRDN] * [NewSuperior] ! [Modrdn] [{$pagename}] - Renaming an Entry The following [example] shows how to __rename__ an entry and retain the old value: %%prettify {{{ version: 1 dn: cn=johndoe, ou=provo, ou=users, o=novell changetype: moddn newrdn: cn= jimmydoe deleteoldrdn: 0 }}} /% ! [Modrdn] [{$pagename}] - Moving an Entry The following [example] shows how to __move__ an entry from the provo container to the toronto container: %%prettify {{{ version: 1 dn: cn=johndoe, ou=provo, ou=users, o=novell changetype: moddn newrdn: cn=johndoe deleteoldrdn: 1 newsuperior: ou=toronto, ou=users, o=novell }}} /% ! [Modrdn] [{$pagename}] - Renaming and Moving an Entry The following example shows how to __rename__ and __move__ an entry in the same operation: %%prettify {{{ version: 1 dn: cn=johndoe, ou=provo, ou=users, o=novell changetype: moddn newrdn: cn=jimmydoe deleteoldrdn: 0 newsuperior: ou=toronto, ou=users, o=novell }}} /% ! [Example] to __move__ the __entry__ from people to expeople %%prettify {{{ # moves the entry from people to expeople dn: cn=Robert Smith,ou=people,dc=example,dc=com changetype: modrdn # NOTE: rdn unchanged newrdn: cn=Robert Smith # deletes old entry deleteoldrdn: 1 # adds to expeople hierarchy newsuperior: ou=expeople,dc=example,dc=com }}} /% ! [Example] to __copy__ of the entry in expeople %%prettify {{{ # makes a copy of the entry in expeople dn: cn=Robert Smith,ou=people,dc=example,dc=com changetype: modrdn # NOTE: rdn unchanged newrdn: cn=Robert Smith # keeps current entry deleteoldrdn: 0 # adds to expeople hierarchy newsuperior: ou=expeople,dc=example,dc=comcom] }}} /% !! More Information There might be more information for this subject on one of the following: [{ReferringPagesPlugin before='*' after='\n' }] ---- * [#1] - [LDAP LDIF and DSML|http://www.zytrax.com/books/ldap/ch8/#deleteoldrdn/|target='_blank'] - based on information obtained 2016-07-03