FreeKB - slappasswd and ldappasswd commands (reset password)
OpenLDAP - slappasswd and ldappasswd commands (reset password)

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


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 3cf8d in the box below so that we can be sure you are a human.