Questo contenuto non è disponibile nella lingua selezionata.
20.5. Configuring temporary password rules
Directory Server password policies support setting temporary passwords on user accounts. If you assign a temporary password to a user, Directory Server rejects any other operation than a password change until the user changes its password.
The following are the features of temporary passwords:
- Only the
cn=Directory Manageraccount can assign temporary passwords. - Directory Server allows authentication attempts only for a fixed number of times to avoid that an attacker probes the password.
- Directory Server allows authentication attempts after a specified delay to configure that the temporary passwords are not usable directly after you set them.
- Directory Server allows authentication attempts only for a specified time so that the temporary password expires if a user does not use or reset it.
- If the authentication was successful, Directory Server requires that the user resets the password before the server performs any other operation.
By default, temporary password rules are disabled. You can configure them in global or local password policies.
20.5.1. Enabling temporary password rules in the global password policy Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
To enable the temporary password feature for the whole Directory Server instance:
- Enable that users must change their password if an administrator resets it.
- Configure the feature in the global password policy.
If an administrator updates the
userPassword attribute of a user and sets the passwordMustChange attribute to on, Directory Server applies the temporary password rules.
Procedure
- Configure that a user must change its password after an administrator resets it:
dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwdmustchange on
# dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwdmustchange onCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the temporary password rules settings in a global password policy:
dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60
# dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this example:- The
--pwptprmaxuseoption sets the maximum number of attempts a user can use the temporary password to5. - The
--pwptprdelayexpireatoption sets the time before the temporary password expires to3600seconds (1 hour) - The
--pwptprdelayvalidfromoption configures that the time set in--pwptprdelayexpireatstarts60seconds after an administrator reset the password of a user.
Verification
- Display the attributes that store the temporary password rules:
dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy get | grep -i TPR
# dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy get | grep -i TPR passwordTPRMaxUse: 5 passwordTPRDelayExpireAt: 3600 passwordTPRDelayValidFrom: 60Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.5.2. Enabling temporary password rules in a local password policy Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
To enable the temporary password feature for a specific user or sub-tree, enable that users must change their password if an administrator resets it, and configure the feature in a local password policy.
If an administrator updates the
userPassword attribute of a user and sets the passwordMustChange attribute to on, Directory Server applies the temporary password rules if the user:
- Has the local password policy enabled
- Is stored in a sub-tree that has the local password policy enabled
Procedure
- Configure that a user must change its password after an administrator resets it:
dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwdmustchange on
# dsconf -D "cn=Directory Manager" ldap://server.example.com pwpolicy set --pwdmustchange onCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the temporary password rules settings:
- For a sub-tree:
dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp addsubtree --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60 ou=People,dc=example,dc=com
# dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp addsubtree --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60 ou=People,dc=example,dc=comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For a user:
dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp adduser --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60 uid=example,ou=People,dc=example,dc=com
# dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp adduser --pwptprmaxuse 5 --pwptprdelayexpireat 3600 --pwptprdelayvalidfrom 60 uid=example,ou=People,dc=example,dc=comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Note that you can only set a local password policy on entries that exist.In these examples:- The
--pwptprmaxuseoption sets the maximum number of attempts a user can use the temporary password to5. - The
--pwptprdelayexpireatoption sets the time before the temporary password expires to3600seconds (1 hour). - The
-pwptprdelayvalidfromoption configures that the time set in--pwptprdelayexpireatstarts60seconds after an administrator reset the password of a user.
Verification
- Display the local password policy of the distinguished name (DN):
dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp get distinguished_name | grep -i TPR
# dsconf -D "cn=Directory Manager" ldap://server.example.com localpwp get distinguished_name | grep -i TPR passwordTPRMaxUse: 5 passwordTPRDelayExpireAt: 3600 passwordTPRDelayValidFrom: 60Copy to Clipboard Copied! Toggle word wrap Toggle overflow