LDAP Setup and Configuration Guide

How to Rename a Directory Entry

Use ldapmodrdn(1) to rename an existing directory entry. ldapmodrdn opens a connection to the LDAP directory server, binds to the directory server, and performs one or more LDAP modify RDN (rename) operations on the directory.

  1. Bind as the directory manager (password “enigma”) and change the RDN cn value from “User Interface” to “Ergonomic”.


    % ldapmodrdn -r -D "cn=Manager, o=Ultra Keyboards Inc., \
    c=US" -w enigma "cn=User Interface, o=Ultra Keyboards Inc., \
    c=US" "cn=Ergonomic"

ldapmodrdn returns nothing if the operation is successful; otherwise, an error message is displayed.