Check password status with passwd -S
Instantly tell if an account's password is active, locked, or missing — the forgotten status flag of the passwd command.
Run `sudo passwd -S alice` and read the flag: P = password set, L = locked, NP = no password.
01Command
Command
$ sudo passwd -S alice02What it does
You can't read /etc/shadow hashes to see account state comfortably; `passwd -S` decodes it for you into a single line with the state flag, last-change date, and min/max age settings. `L` is what `usermod -L` and `passwd -l` produce, and it's the first thing to check when a login with the right password fails. Use `passwd --status` (same thing) for all listed users by passing no username.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- passwd(1) — change user passwordEvidence: Documents -S (status): shows whether the password is set (P), locked (L), or has no password (NP), plus change dates and limits.
Last verified: 2026-09-17 · Category: Security & Privacy