Beginner
Package: shadow-utils / passwd
passwd
Set or change a user's password.
Syntax
passwd [username]
Description
passwd sets a user's password interactively. Run without arguments it changes the current user's own password; run by root with a username it sets that user's password, and can also lock/unlock accounts or force expiry.
Examples
passwd
Change your own password
sudo passwd alice
Set another user's password (as root)
sudo passwd -l alice
Lock a user account
sudo passwd -e alice
Force the password to expire, requiring a change at next login