Update README.md

This commit is contained in:
Marisa 2025-10-02 11:30:35 -04:00
parent 718d2453fa
commit 3219aa0165

View File

@ -192,7 +192,7 @@ dn: uid=marisa,ou=Engineering,dc=example,dc=com
mail: marisa.kirisame@example.com mail: marisa.kirisame@example.com
``` ```
### <ins>_Modify user password_</ins> <!--### <ins>_Modify user password_</ins>
In this examples, we are changing the special attribute password of the user marisa from ou Supergirls, using the old password.\ In this examples, we are changing the special attribute password of the user marisa from ou Supergirls, using the old password.\
\ \
@ -211,7 +211,7 @@ root@example:/etc/ldap# ldappasswd -H ldap:/// -x -D "uid=marisa,ou=Supergirls,d
New password: 6vUj/2lE 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. _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.
-->
### <ins>_Reset user password_</ins> ### <ins>_Reset user password_</ins>
In the likely common event that we forgot the old password of an specific user, we need to reset it.\ In the likely common event that we forgot the old password of an specific user, we need to reset it.\
@ -223,6 +223,12 @@ Re-enter new password: newpasswd
Enter LDAP Password: admin Enter LDAP Password: admin
``` ```
Note we need to use the **root** password (_admin_ by default) in the last query ("Enter LDAP Password") to reset an user's password. Note we need to use the **root** password (_admin_ by default) in the last query ("Enter LDAP Password") to reset an user's password.
\
If we want to change the password as the user marisa, we need to use the user's _plain password_ we entered when we created it:
```
root@example:/etc/ldap# ldappasswd -H ldap:/// -x -D "uid=marisa,ou=Supergirls,dc=example,dc=com" -w _plain password_ -s newpassword "uid=marisa,ou=Supergirls,dc=example,dc=com"
```
With this commmand we changed the user marisa password's from _plain password_ to literally "newpassword", change this as needed.
### <ins>_Query as an specific user_</ins> ### <ins>_Query as an specific user_</ins>