passwd command
Change passwords and lock or expire accounts.
- Users & permissions
- Package passwd
- 5 options · 6 examples
Syntax
passwd [options] [user]Provided by the passwd package. Run man passwd for the full manual.
Common options
| Option | What it does |
|---|---|
-l | Lock the password |
-u | Unlock it |
-e | Force a change at next login |
-d | Delete the password |
-S | Show the password status |
Examples
Change your password
passwdChange another user's password
sudo passwd aliceForce a change at next login
sudo passwd -e aliceLock an account
sudo passwd -l alicePassword status
sudo passwd -S aliceSet password ageing
sudo chage -M 90 alice
No example matches. Check the options table or search the guides.
passwd guides
- How to Use the Chage Command in Linux Linux Commands · Updated Apr 2025
- How to Force User to Change Password at Next Login in Linux Security · Updated Apr 2025
- Linux /etc/passwd File Linux · Updated Apr 2025
