RHCSA 9.2: Passwords and password aging
Setting a password that must be changed, the default password lifetime for new users, and account expiry.
Before you start
The lab creates user dave (password Lab-Pass-1), and notes
/etc/login.defs so reset can put it back.
Tasks
- Give user
davethe passwordSecret-2026and make him change it at the next login. - Make passwords of users created from now on expire after 90 days, without changing existing users.
- Make
dave's account expire on 31 December 2027, with a 14-day warning before his password expires.
Hints
passwd dave(orchpasswd),chage -d 0(orpasswd -e);chage -l dave;su - davefrom a normal user asks for a new password.PASS_MAX_DAYSin/etc/login.defs; create a test user and runchage -lon it, then remove it.chage -E 2027-12-31 -W 14 dave.