From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage aging for local user accounts

Manage aging for local user accounts

- [Instructor] Account aging is important because we can determine when passwords need to be changed or even set accounts to automatically lock. We can change these settings in the global user account settings in the /etc/login.defs file. This, however, only affects newly created users. If we need to change existing user accounts, we have to use other commands. We could manually edit the /etc/shadow file for most of these settings but the password aging fields are fairly cryptic and it's easy to get these settings wrong. The main command we'll use to change user account settings is chage or change age. Chage is used to change the password and account aging information for users. Chage -d changes the number of days since January 1st, 1970 when the password was last changed. Setting this to zero means the password has not changed and forces a password change on next login. Dash capital E sets the date that the user's account will expire. Dash capital I sets the number of days of…

Contents