LFCS User and Group Management Practice Question
A user must change their password at next login per security policy. The admin wants to expire the password immediately. Which command accomplishes this?
⚠ Common exam trap
LFCS often tests the confusion between password expiration (chage -d 0) and password aging policies (chage -M), or between passwd options and chage options, causing candidates to pick a command that sets a future expiration instead of immediate expiration.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
chage -d 0 username
The chage -d 0 username command sets the 'last password change' date to 0 (January 1, 1970), which forces the user to change their password at the next login. This is the standard Linux method to immediately expire a user's password without disabling the account.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
passwd -f username
Why it's wrong here
-f is not a standard flag for passwd.
- ✗
usermod -p '' username
Why it's wrong here
usermod -p '' writes an empty password hash into /etc/shadow, leaving the account passwordless rather than expired, so no change is prompted at login. It is used to blank or clear a password field, not to force expiry.
- ✗
chage -M 90 username
Why it's wrong here
chage -M 90 sets the maximum password age to 90 days, which only schedules expiry 90 days from the last change; it does not force a change at next login. It is the right tool for enforcing periodic password rotation policy, not immediate expiry.
- ✓
chage -d 0 username
Why this is correct
`chage -d 0 username` sets the last-password-change date to the epoch, so the system treats the password as aged beyond its maximum lifetime and forces a change at next login. This directly satisfies the immediate-expiry constraint, unlike `passwd -e`, which achieves the same via a different flag.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.