diff --git a/README.md b/README.md index 77156c7..a5188ed 100644 --- a/README.md +++ b/README.md @@ -164,19 +164,28 @@ mail: marisa.kirisame@example.com ### _Modify user password_ -in order to change a user password we can run the following command, in this example we are changing user (_uid_) marisa password from the Organizational Unit (_ou_) Supergirls +In this examples, we are changing user uid marisa from ou Supergirls **password**.\ +\ +In order to change the password interactively (writing in the prompt when asked), we can run this command: ``` root@example:/etc/ldap# ldappasswd -H ldap:/// -x -D "uid=marisa,ou=Supergirls,dc=example,dc=com" -W -S "uid=marisa,ou=Supergirls,dc=example,dc=com" -New password: plainpasswd -Re-enter new password: plainpasswd -Enter LDAP Password: oldplainpasswd +New password: newpasswd +Re-enter new password: newpasswd +Enter LDAP Password: oldpasswd ``` -plainpasswd being the new password we want to use, and oldplainpasswd, the last plain password we were using +_newpasswd_ being the new password we want to use, and _oldpasswd_, the last password we were using for the user uid marisa.\ +\ +To change the password in an non interactive (sending the password directly via the command), we can run this: +``` +root@example:/etc/ldap# ldappasswd -H ldap:/// -x -D "uid=marisa,ou=Supergirls,dc=example,dc=com" -w newpasswd "uid=marisa,ou=Supergirls,dc=example,dc=com" +New password: 6vUj/2lE +``` +_newpasswd_ being the new password we want to use. We can also notice the hashed output of our new password is not a typical LDAP SSHA hash, this is due to security implementations. ### _Reset user password_ In the likely common event that we forgot the password of an specific user, we need to reset it.\ -In this example we forgot the _plain password_ of the _uid_ marisa, we can reset it with this command: +In this example we forgot the password of the user uid marisa, we can reset it with this command: ``` root@example:/etc/ldap# ldappasswd -H ldap:/// -x -D "cn=admin,dc=example,dc=com" -W -S "uid=marisa,ou=Supergirls,dc=example,dc=com" New password: newpasswd