XK0-006 Security Practice Question
An administrator wants to force a password change for user 'alice' on next login. Which command is appropriate?
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
✓
passwd --expire alice
The correct command to force a password change on next login is `passwd --expire alice`. This immediately expires alice's password, requiring a change at next login. The other options are incorrect: `passwd -l` locks the account, `chage -l alice` lists account aging information without changing anything, and `usermod -f` sets the inactivity period.
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 --expire alice
Why this is correct
This command immediately expires alice's password, forcing a change on next login. It is the standard method.
- ✗
passwd -l alice
Why it's wrong here
`passwd -l` locks the account, preventing login, not forcing a password change. Incorrect.
- ✗
chage -l alice
Why it's wrong here
While `chage -d 0` also forces a password change on next login, it is not the direct command for expiration. `passwd --expire` is the expected answer for this exam.
- ✗
usermod -f alice
Why it's wrong here
`usermod -f` sets the inactivity period; it does not force immediate password change. Incorrect.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
passwd
passwd is a command-line utility used on Linux and Unix-like systems to change a user's password, typically stored in an encrypted format in the /etc/shadow file.
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.