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

Updated:   |  OpenLDAP articles

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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