FreeKB - Reset OpenLDAP password (slappasswd, ldappasswd)
Reset OpenLDAP password (slappasswd, ldappasswd)

Home > Search


The slappasswd command can be used to generate a hash of a users password. In this example, the hash is {SHHA}pfjf4857vjslsj4j4g8skdffj3342.

~]# slappasswd
New password: ********
Re-enter new password: ********
{SHHA}pfjf4857vjslsj4j4g8skdffj3342

 

Update /etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif to contain the hash.

olcRootPW: {SHHA}pfjf4857vjslsj4j4g8skdffj3342

 

Restart slapd.

 


Likewise, the ldappasswd can be used to reset a users password in OpenLDAP. In this example, JohnDoe password is updated.

ldappasswd -x -D dc=example,dc=com -a <current password> -s <new password> JohnDoe

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter ef053 in the box below so that we can be sure you are a human.




Comments