7.6. Resetting the Directory Manager Password

7.6. Resetting the Directory Manager Password

Passwords are stored in the Directory Server databases and can be modified with tools like ldapmodify and through the Directory Server Console. The Directory Manager password is stored in the Directory Server configuration files and can be viewed (if lost) and modified by editing that file. To check or reset the Directory Manager password, do the following:

  1. Stop the Directory Server. If the Directory Server is not stopped when the configuration files are edited, the changes are not applied.

    service dirsrv stop
    
  2. Generate a new, hashed password using pwdhash. On Linux and Solaris, the tool is in the /usr/bin directory; on HP-UX, it is in the /opt/dirsrv/bin directory. For example:

    /usr/bin/pwdhash newpassword
    
    {SSHA}nbR/ZeVTwZLw6aJH6oE4obbDbL0OaeleUoT21w==
    
  3. In the configuration directory, open the dse.ldif file. For example:

    cd /etc/dirsrv/slapd-instance/
    vi dse.ldif
    
  4. Locate the nsslapd-rootpw parameter.

    nsslapd-rootpw: {SSHA}x03lZLMyOPaGH5VB8fcys1IV+TVNbBIOwZEYoQ==
    

    Delete the old password, and enter in the new hashed password. For example:

    nsslapd-rootpw: {SSHA}nbR/ZeVTwZLw6aJH6oE4obbDbL0OaeleUoT21w==
    
  5. Save the change.

  6. Start the Directory Server. For example:

    service redhat-ds start
    
  7. When the Directory Server restarts, log into the Console again as Directory Manager, and verify that the password works.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.