How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

Share this Article :

Reset the Directory Manager Password

It is best practice to remember passwords, but because too many passwords, sometimes we forget.

We are not encouraged to write the password on any paper or share the password via email. This can lead to more serious security issues.

As a system administrator, sometimes forget the password to manage the directory service. Usually it use admin or Directory Manager’s password.

The normal user password is stored in Directory Server database and can be modified with tool such as ldapmodify and through 389 Directory Server client Console.

Also Read :   How to Disable Autostart for a Service at boot on Linux CentOS 7 / RHEL 7

Directory Manager’s password stored in the directory server configuration file and can be seen (if you lose) and modified by editing the file.

If you forget the Directory Manager’s password, it’s pretty easy to reset it. You will have to edit the main server config file (dse.ldif).

This article shows how to check or reset the Directory Manager password on RHEL 7 or CentOS 7.

Steps to Reset the Directory Manager Password

1. You must stop the directory service. If the server is running when the configuration file (dse.ldif) are modified, the changes will be lost and not applied.

# systemctl stop [yourinstance] 

2. Next, generate the new password using the pwdhash command :

# /usr/bin/pwdhash yournewpassword

Note : This will print out the hashed password string using the default directory manager password hashing scheme for your instance (SSHA by default)

Also Read :   How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7

3. In the configuration directory, open dse.ldif.

# cd /etc/dirsrv/slapd-instancename
# vi dse.ldif 

4. Locate the nsslapd-rootpw parameter. Replace old directory manager password with the generated your new password in step 2 above :

nsslapd-rootpw: {SSHA}123s0doP1i0VgQMm8jMjGw72AzVEzyLJS9sj34==

5. Save the changes and start the directory service :

# systemctl start [yourinstance] 

6. Log into the Console again as Directory Manager, and verify the password.

I hope this article gives you some ideas and essential guidance on how to reset the Directory Manager Password on RHEL 7 / CentOS 7 / Oracle Linux 7.

Also Read :   How to Install and Use Traceroute in Linux RHEL 6/7, CentOS 6/7, Oracle Linux 6/7

Resources :


Leave a Reply