Ensure inactive password lock is 30 days or less - /etc/default/useradd


User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.

Note: A value of -1 would disable this setting.


Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.


Run the following command to set the default password inactivity period to 30 days:

# useradd -D -f 30

Modify user parameters for all users with a password set to match:

# chage --inactive 30 <user>

See Also