mediumMultiple SelectObjective-mapped
XK0-006 Practice Question: A security policy requires that user passwords…
A security policy requires that user passwords must expire every 60 days and users should be warned 7 days before expiration. Which two commands can be used to set these policies? (Select TWO).
⚠ Common exam trap
Test-takers frequently confuse the `chage` flags: candidates often mistake `-E` (account expiration) for password maximum age, or mix up `passwd` options like `-n` (minimum days) with `-x` (maximum days), leading them to select options that set the wrong parameters.
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 -x 60 -w 7 username
The `passwd -x 60 -w 7 username` command sets the maximum password age to 60 days (`-x`) and the warning period to 7 days before expiration (`-w`). This directly satisfies the policy requirements for password expiration and advance warning.
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 -x 60 -w 7 username
Why this is correct
Correct: passwd also sets max days and warning.
- ✗
chage -E 60 -W 7 username
Why it's wrong here
chage -E sets account expiration date, not password max days.
- ✗
usermod -e 60 -f 7 username
Why it's wrong here
This sets account expiry date and inactivity, not password expiration.
- ✓
chage -M 60 -W 7 username
Why this is correct
Correct: chage sets password expiration and warning.
- ✗
passwd -n 60 -m 7 username
Why it's wrong here
This sets minimum days and, -m is not the correct option for warning.
Go deeper
Related to this question
Learn chapter
User and Group Administration
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.
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.
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.