HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

In the dse.ldif configuration file, the backend configuration entry cn=config,cn=ldbm
database,cn=plugins,cn=config has a switch called nsslapd-subtree-rename-switch
as follows:
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
[...]
nsslapd-subtree-rename-switch: off
If the value is on, the entryrdn index is generated and used instead of entrydn. If the value is
off, the entrydn index is used. When the server is started, it checks the existence of the index
files and the value of nsslapd-subtree-rename-switch. If they mismatch, the server logs
an error and does not start.
Enable subtree rename feature
Subtree rename is disabled by default. Following are the steps to enable subtree rename feature:
1. Stop the directory server instance.
/opt/dirsrv/slapd-instance_name/stop-slapd
2. Modify the configuration file /etc/opt/dirsrv/slapd-instance_name/dse.ldif,
and set the configuration parameter nsslapd-subtree-rename-switch to on.
3. Run dn2rdn command to convert entrydn to entryrdn.
/opt/dirsrv/slapd-instance_name/dn2rdn
4. Start the directory server instance.
/opt/dirsrv/slapd-instance_name/start-slapd
Disable subtree rename feature
Following are the steps to disable subtree rename feature:
1. Export all the database information to LDIF.
For example:
cd /opt/dirsrv/slapd-instance_name
./db2ldif -n userRoot -a /var/opt/dirsrv/slapd-instance/db/userRoot.ldif
./db2ldif -n NetscapeRoot -a /var/opt/dirsrv/slapd-instance/db/NetscapeRoot.ldif
2. Stop the directory server instance.
/opt/dirsrv/slapd-instance_name/stop-slapd
3. Modify the configuration file /etc/opt/dirsrv/slapd-instance_name/dse.ldif
and set the configuration parameter nsslapd-subtree-rename-switch to off.
4. Import the LDIF files. The new entrydn.db4 file is populated.
cd /opt/dirsrv/slapd-instance_name
./ldif2db -D "cn=Directory Manager" -w secret \
-i /var/opt/dirsrv/slapd-instance_name/db/userRoot.ldif -n UserRoot
./ldif2db -D "cn=Directory Manager" -w secret \
-i /var/opt/dirsrv/slapd-instance_name/db/NetscapeRoot.ldif -n NetscapeRoot
5. Start the directory server instance.
/opt/dirsrv/slapd-instance_name/start-slapd
Renaming an Entry or Subtree
To rename a subtree, use the following modrdn changetype operation:
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com
dn: ou=Engineering,ou=People,dc=example,dc=com
changetype: modrdn
newrdn: ou=Development
deleteoldrdn: 1
Here newrdn - specifies the new RDN of the entry
3.8 Subtree Rename and Entry Move 145