The passwd command

change user password 5 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-S, --status
Display account status information. The status information consists of 7 fields.
-u, --unlock
Unlock the password of the named account.

Examples

sudo passwd username

Set password for user

passwd

Change your own password

sudo passwd ana

Set her initial password

sudo passwd -S maria

Password status: P = usable, L = locked

sudo passwd -u maria

Unlock the password

Lessons that use passwd