Linux: Reset and Expire a User Password
Inspect an account, model an interactive password reset, and expire the temporary password for the next password-based login. Work through it yourself in the live host terminal below.
Symptom
Inspect an account, model an interactive password reset, and expire the temporary password for the next password-based login.
Your mission
Inspect, recover, then verify
Format
Linux shell
Investigate before you configure.
Use the CLI evidence to isolate the fault, make the smallest safe correction, then verify the network state changed.
Observe the symptom and link state.
Diagnose by comparing the protocol evidence.
Verify the expected device state and confirm the original symptom is resolved.
Console access: Linux
This workspace stacks for portrait phones. Rotate to landscape for the full split-screen console.
Need a hint?
Reveal the root cause when you're ready.
Try the investigation first, then use this as your escape hatch, not a dead end.
Create a free account to open Linux: Reset and Expire a User Password. You get the root cause and the full step-by-step fix.
No spam. The fix lands in your inbox too. Your account includes 5 guided labs free. After that, the Learning Pass unlocks every remaining lab.
Lab debrief
Turn the session into a repeatable troubleshooting pattern.
Use this reference after your attempt: first explain the symptom, then verify the evidence, then confirm the repair.
The problem
Maya forgot her password. An authorized administrator must reset it without putting a secret in shell history.
What you'll practice
- Inspect password status before changing it
- Use passwd's interactive prompts rather than command-line secrets
- Expire the temporary password for the next password-based login
- Verify password aging state
The topology
One Linux host already has a local maya account with a working password.
Commands to run yourself
The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.
sudo passwd -S mayaTopology diagram
Rate this lab
No ratings yet
Fact-checked references
The commands and behaviour in this lab were checked against these primary references.
Frequently asked
Why expire the new password?
It can prompt the user to choose a private replacement at the next password-based login instead of continuing with the administrator's temporary secret.
Does passwd -e disable the account?
No. It expires the password, not the account. Whether a login requires a password change depends on the authentication method and local policy.
Ready to run this lab yourself?
No setup, no image sourcing. Book a session or ask for a live demo.