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 usernameSet password for user
passwdChange your own password
sudo passwd anaSet her initial password
sudo passwd -S mariaPassword status: P = usable, L = locked
sudo passwd -u mariaUnlock the password