Information
The passwordtime parameter in /etc/login.conf allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the passwordtime parameter be set to less than or equal to 365 days.
The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.
Solution
Set the passwordtime parameter to conform to site policy in /etc/login.conf and add something similar to the following in the default class :
:passwordtime=365d:
After editing the file regenerate the login.conf.db with the command:
# cap_mkdb /etc/login.conf
Modify user parameters for all users with a password set to match:
# # for i in $(awk -F: '($3>=1000)&&($1!="nobody"){print $1}' /etc/passwd); do pw usermod -n $i -p +365d; done
Impact:
The password expiration must be greater than the minimum days between password changes or users will be unable to change their password
Item Details
Category: CONFIGURATION MANAGEMENT, IDENTIFICATION AND AUTHENTICATION, SYSTEM AND SERVICES ACQUISITION
References: 800-53|CM-1, 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|CM-7(1), 800-53|CM-9, 800-53|IA-5, 800-53|SA-3, 800-53|SA-8, 800-53|SA-10, CSCv7|4.4
Control ID: d3a190d4e013d52414563e8b58bdbb287ddd732b3a76578c8184e28a83066cb9