I am working on testing the password expiration functionality, specifically the CIS properties related to password expiration (MAX_DAYS
).
Here are the steps I followed for testing:
Changed the password for the user testuser
using passwd
, and set MAX_DAYS
to 365 using:
chage --maxdays 365 testuser
Verified the setting using chage -l testuser
, which showed
ac1.thirdcdnvx0d1.cdn ~# chage -l testuser
Last password change : Oct 15, 2024
Password expires : Oct 15, 2025
Password inactive : Oct 15, 2025
Account expires : never
Minimum number of days between password change : 1
Maximum number of days between password change : 365
Number of days of warning before password expires : 7
ac1.thirdcdnvx0d1.cdn ~#
Simulated a future date (Nov 14, 2025) using
sudo date -s "2025-11-14"
Logged out and attempted to log back in as testuser
Even after the password expiration date, I could still log in with the existing password. The system did not prompt for a password change.
I also set MAX_DAYS
to 0 (which should force an immediate expiration), but I could still log in without being prompted to change the password.
Has anyone encountered similar issues with the MAX_DAYS
setting not working? Any guidance or additional configuration that might be missing would be appreciated.