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.
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
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 :
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.