Skip to main content
Kill -9 Club
Sign in

passwd

AccountsPackage: passwd

Changes a password, or locks an account with -l without deleting it. Locking closes neither the open sessions nor SSH key access: those are two other decisions.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

passwd -l
Locks the password by prefixing it with !, the same operation as usermod --lock. The account itself stays open: an SSH key keeps working.
passwd -S
Reports the password status without changing anything: the name, then L (locked), P (usable) or NP (none), then the date of the last change and the four periods from /etc/shadow. It says nothing about the account expiry date.

Lessons that teach it