Password policies include password expiration policy, password complexity policy, and account lockout policy.
- Password expiration policy defines the length of time a credential’s password is valid before the system forces a password change.
- Password complexity policy defines the minimum requirements surrounding the definition of an account’s password.
- Account lockout policy defines the behavior of the system when incorrect credentials are used for authenticating to the system.
Configure the Local User Password Expiration Policy for Site Protection and Disaster Recovery for VMware Cloud Foundation
For local users of the vSphere Replication and the Site Recovery Manager appliances, you configure the password expiration policy on a per-user basis.
Local User |
Setting |
Default |
Description |
---|---|---|---|
root |
|
99999 |
Maximum number of days between password change |
|
0 |
Minimum number of days between password change |
|
|
7 |
Number of days of warning before a password expires |
Procedure
- Log in to the vSphere Replication appliance by using a Secure Shell (SSH) client at <vrms_fqdn>:22 as root.
- Change the value of the maximum number of days between password change by running the following command.
chage --maxdays <your_value> root
- Change the value of the minimum number of days between password change by running the following command.
chage --mindays <your_value> root
- Change the value of the number of days of warning before the password expires by running the following command.
chage --warndays <your_value> root
- Verify the configuration of the desired values by running the following command.
chage --list root
-
Repeat the procedure for the admin user and the remaining vSphere Replication appliances.
-
Repeat the procedure for the Site Recovery Manager appliance.
Configure the Local User Password Complexity Policy for Site Protection and Disaster Recovery for VMware Cloud Foundation
The password complexity policy for local users of the vSphere Replication and the Site Recovery Manager appliances determines the password format requirements on the basis of an account-specific set of rules. Some settings are present by default while others must be configured.
Setting | Default | Description |
---|---|---|
|
8 |
Minimum password length (number of characters) |
|
4 |
Minimum number of character types that must be used (for example, uppercase, lowercase, digits, and so on) |
|
4 |
Minimum number of characters that must be different from the old password |
|
0 |
Maximum number of times a single character can be repeated |
|
3 |
Maximum number of retries |
|
5 |
Maximum number of passwords the system remembers |
Setting | Sample Value | Description |
---|---|---|
dcredit |
-1 | Maximum number of digits that generate a credit |
ucredit |
-1 | Maximum number of uppercase characters that generate a credit |
lcredit |
-1 | Maximum number of lowercase characters that generate a credit |
ocredit |
-1 | Maximum number of other characters that generate a credit |
Procedure
- Log in to the vSphere Replication appliance by using a Secure Shell (SSH) client at <vrms_fqdn>:22 as root.
- Back up the /etc/pam.d/system-password file for the appliance.
cp -p /etc/pam.d/system-password /etc/pam.d/system-password-`date +%F_%H:%M:%S`.back
- Configure the settings according to the requirements of your organization.
sed -i -E 's/minlen=[-]?[0-9]+/minlen=<your_value>/g' /etc/pam.d/system-password sed -i -E 's/minclass=[-]?[0-9]+/minclass=<your_value>/g' /etc/pam.d/system-password sed -i -E 's/difok=[-]?[0-9]+/difok=<your_value>/g' /etc/pam.d/system-password sed -i -E 's/maxsequence=[-]?[0-9]+/maxsequence=<your_value>/g' /etc/pam.d/system-password sed -i -E 's/retry=[-]?[0-9]+/retry=<your_value>/g' /etc/pam.d/system-password sed -i -E 's/remember=[-]?[0-9]+/remember=<your_value>/g' /etc/pam.d/system-password sed -i -E '/pam_pwquality.so/ s/$/ lcredit=<your_value>/' /etc/pam.d/system-password sed -i -E '/pam_pwquality.so/ s/$/ ocredit=<your_value>/' /etc/pam.d/system-password sed -i -E '/pam_pwquality.so/ s/$/ dcredit=<your_value>/' /etc/pam.d/system-password sed -i -E '/pam_pwquality.so/ s/$/ ucredit=<your_value>/' /etc/pam.d/system-password
- Verify the values.
cat /etc/pam.d/system-password
5. Repeat the procedure for the remaining vSphere Replication appliances.
6. Repeat the procedure for the Site Recovery Manager appliance.
Configure the Local User Account Lockout Policy for Site Protection and Disaster Recovery for VMware Cloud Foundation
To configure the account lockout policy for the local accounts for the vSphere Replication and the Site Recovery Manager appliances, decide on certain policy settings.
Setting |
Default |
Description |
---|---|---|
|
5 |
Maximum number of authentication failures before the account is locked |
|
1800 |
Amount of time in seconds that the account remains locked |
|
1800 |
Amount of time in seconds that the root account remains locked |
Procedure
- Log in to the vSphere Replication appliance by using a Secure Shell (SSH) client at <vrms_fqdn>:22 as root.
- Back up the /etc/pam.d/system-auth file for the appliance by running the following command.
cp -p /etc/pam.d/system-auth /etc/pam.d/system-auth-`date +%F_%H:%M:%S`.back
- Configure the maximum number of failed log-in attempts.
sed -i -E 's/deny=[-]?[0-9]+/deny=<your_value>/g' /etc/pam.d/system-auth
- Configure the unlock time for the root account.
sed -i -E 's/root_unlock_time=[-]?[0-9]+/root_unlock_time=<your_value>/g' /etc/pam.d/system-auth
- Configure the unlock time for all other local accounts.
sed -i -E 's/unlock_time=[-]?[0-9]+/unlock_time=<your_value>/g' /etc/pam.d/system-auth
- Verify the values.
cat /etc/pam.d/system-auth
-
Repeat the procedure for the remaining vSphere Replication appliances.
-
Repeat the procedure for the Site Recovery Manager appliance.