CertGrid CertGrid
Hands-on Lab·CompTIA Linux+

Password policy and account expiry

Domain 3 asks about account policy, and the commands are easy while the semantics are not. This guide shows that /etc/login.defs is read only when an account is created, ages an existing account with chage, and then separates the two expiries that people conflate - proving with a real key login that an expired ACCOUNT is refused by PAM while an expired PASSWORD is refused by something else entirely.

Security Guide 24 of 28 Intermediate

The RPM-family host, which ships `pwquality.conf` and `pwscore`. One line runs on the Debian host to show what it sets instead.
Server NameIP AddressOSRolesCPURAMHDD
LPLUS-B01192.168.0.74AlmaLinux 10.2RPM-family host - dnf, firewalld, NetworkManager, SELinux2 Core4 GB50 GB

This guide includes

Use this when a policy has to apply to people who already have accounts, or when someone leaves and their access must actually stop. This matters because the obvious file does not do what it looks like it does, and because locking a password leaves a key login working.

Before you start

  1. The defaults, and the moment they are read

  2. Changing the default, and who it does not reach

  3. Changing an account that already exists

  4. An expired account refuses a key that works

  5. A password that must be changed, which is a different refusal

  6. What makes a password acceptable

  7. Putting the machine back

Official sources