passwd Interview Questions and Answers¶
Introduction¶
These questions test whether you understand what passwd does, when to use it, and how to verify the result on Linux.
Beginner Questions¶
What does passwd do?
It changes passwords and manages password lock state.
Show a basic command.
passwd
Intermediate Questions¶
Name useful options.
-S: show password status.-l: lock password login.-u: unlock password login.
Show a common administrator command.
sudo passwd student
Scenario-Based Questions¶
How would you handle passwd lock and unlock?
sudo passwd -l student
What would you verify afterward?
sudo passwd -S student
Expected output should look similar to:
student LK 2026-05-30 0 99999 7 -1 (Password locked.)
Practical Task Questions¶
Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.
Quick Review¶
passwd
sudo passwd student
sudo passwd -S student
Related Guides¶
Summary¶
A strong passwd answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.