Update README.md
This commit is contained in:
parent
4d3dbd965a
commit
b9cac65769
21
README.md
21
README.md
@ -164,19 +164,28 @@ mail: marisa.kirisame@example.com
|
|||||||
|
|
||||||
### <ins>_Modify user password_</ins>
|
### <ins>_Modify user password_</ins>
|
||||||
|
|
||||||
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"
|
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
|
New password: newpasswd
|
||||||
Re-enter new password: plainpasswd
|
Re-enter new password: newpasswd
|
||||||
Enter LDAP Password: oldplainpasswd
|
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.
|
||||||
|
|
||||||
### <ins>_Reset user password_</ins>
|
### <ins>_Reset user password_</ins>
|
||||||
|
|
||||||
In the likely common event that we forgot the password of an specific user, we need to reset it.\
|
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"
|
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
|
New password: newpasswd
|
||||||
|
Loading…
Reference in New Issue
Block a user