Skip to content

passwd command

Change passwords and lock or expire accounts.

On this page

Syntax

passwd [options] [user]

Provided by the passwd package. Run man passwd for the full manual.

Common options

OptionWhat it does
-lLock the password
-uUnlock it
-eForce a change at next login
-dDelete the password
-SShow the password status

Examples

  1. Change your password

    passwd
  2. Change another user's password

    sudo passwd alice
  3. Force a change at next login

    sudo passwd -e alice
  4. Lock an account

    sudo passwd -l alice
  5. Password status

    sudo passwd -S alice
  6. Set password ageing

    sudo chage -M 90 alice

passwd guides

← All Linux commands · Suggest a fix

Back to top