passwd
change a passwordpasswd sets a new password. Run as yourself it asks for the current one first, then the new one twice. Run as root it can set any account’s password, and lock an account so it cannot log in.
Nothing appears as you type a password. That is deliberate, not a frozen terminal.
At the terminal
Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.
What the numbered lines are telling you
The current password is asked so that someone who finds your terminal unlocked cannot change it.
Nothing is echoed, not even stars. Typing it twice guards against a slip that would lock you out.
The hash in /etc/shadow has been replaced. Existing sessions stay logged in; the new password applies from the next login.
P means a usable password is set; L would mean locked. Then the date of the last change and the ageing limits in days.
Switches
A switch changes how the command behaves. These are the ones used day to day; man passwd lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.
-l- Lock the account’s password.
-u- Unlock it.
-e- Expire the password, forcing a change at next login.
-d- Delete the password, leaving the account with none.
-S- Show the account’s password status.
-x DAYS- Set the maximum number of days a password may be used.
Variations worth knowing
The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.
sudo passwd deploySets another user’s password.
sudo passwd -l deployLocks the account’s password. -u unlocks it.
sudo passwd -e deployExpires the password, forcing a change at next login.
sudo chage -l deployShows when the password was changed and when it expires.
In cybersecurity
Passwords are stored as hashes, and a weak password’s hash can be cracked.
A long passphrase resists guessing far better than a short password with symbols. Use a password manager and never reuse one across systems.
passwd -l blocks password logins only. The user can still get in with an SSH key. To disable an account fully, also expire it with usermod -e 1.
It is readable only by root because anyone holding the hashes can attack them offline at full speed.