CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Passwords and Account Aging

One objective covering two things that look alike and are not: password expiry and account expiry. Every `chage` flag here is shown changing a specific field of `/etc/shadow`, so the file stops being a wall of colons - including the field that is a count of days since 1970 rather than a date.

Users and Groups Guide 18 of 67 Intermediate

Written against the versions above. RHEL 10 hashes with **yescrypt** - hashes begin `$y$`. Earlier releases used SHA-512 (`$6$`). The prefix is the algorithm id, and nothing in this guide depends on which one is in use.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

Before you start

  1. The shadow file, field by field

  2. Reading it the easy way

  3. Setting the policy

  4. Expiring an account is not expiring a password

  5. Forcing a change at next login

  6. Three different ways to stop a login

  7. What new accounts inherit

Official sources