hardMultiple Choice
XK0-006 Practice Question: Set a password expiration policy so that all…
An administrator needs to set a password expiration policy so that all users must change their password every 90 days. Which command and option accomplishes this for an existing user?
⚠ Common exam trap
Test-takers frequently confuse the `-M` (maximum days) option with the `-W` (warning days) option, or incorrectly assume `passwd` or `usermod` can set password aging, when in fact `chage` is the dedicated utility for this purpose.
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 -M 90 <username>
The `chage -M 90 <username>` command sets the maximum number of days a password is valid for an existing user. The `-M` option specifies the maximum password age in days, so after 90 days the user will be forced to change their password. This directly implements the required 90-day password expiration policy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
usermod -e 90 <username>
Why it's wrong here
usermod -e sets the account expiration date, after which the account is disabled, not the password change interval. It is tempting because usermod modifies existing accounts and -e concerns expiry, which would be correct if the administrator needed to disable a temporary account on a specific calendar date.
- ✗
passwd -x 90 <username>
Why it's wrong here
The passwd command does not have a -x option; -x is used by chage.
- ✗
chage -W 90 <username>
Why it's wrong here
chage -W sets the warning period before expiry, not the maximum password age, so passwords would never be forced to change. It is tempting because -W is the closest chage flag to expiry; it would be correct when configuring advance warning days, whereas -M 90 sets the 90-day maximum.
- ✓
chage -M 90 <username>
Why this is correct
The chage command's -M option sets the maximum number of days a password remains valid before expiry. Specifying -M 90 enforces a 90-day maximum password age for the existing user, directly satisfying the stem's requirement that all users change passwords every 90 days.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
Policy
A policy is a set of rules or guidelines that defines how an organization manages, secures, and operates its IT systems and services.
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
Courseiva writes every XK0-006 question from scratch — 781 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 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.