Where to start First steps track · 15 stages
Linux Labs

chage — password and account expiry

cheat sheet · Ubuntu 24.04; Bash 5.2 for shell builtins https://lab.dimsanych.ru/en/wiki/chage/

Cheat sheet

  • chage -l student inspect your training account
  • sudo chage -l labpaused inspect the target account
  • getent passwd labpaused inspect UID and shell separately
  • sudo passwd -S labpaused inspect password state separately
  • sudo chage -E 1970-01-02 labpaused expire the training account

Options

-l displays settings, -E sets the account expiration date, and -d sets the last password change date. -m, -M, and -W control minimum and maximum password age and advance warnings; -I concerns the period after password expiry.

The YYYY-MM-DD date format is convenient. Removing expiry with -E -1 is a separate administrative decision, not a mandatory follow-up to inspection. Check your version's interface with chage --help.

Loading…