XK0-006 Security Practice Question
A security analyst wants to ensure that users cannot change their password more than once every 7 days. Which command and option should be used to enforce this policy for user 'jsmith'?
⚠ Common exam trap
Test-takers frequently confuse the `-m` (minimum days) and `-M` (maximum days) options of `chage`, as candidates often mix up which option controls the minimum interval between password changes versus the password expiration period.
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 7 jsmith
The `chage -m 7 jsmith` command sets the minimum number of days required between password changes for user jsmith to 7 days. The `-m` option of `chage` specifically controls the minimum password age, preventing the user from changing their password more than once every 7 days.
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 7 jsmith
Why it's wrong here
The -e flag sets an account expiry date, so 'usermod -e 7 jsmith' would expire the account on day 7 of the epoch, not restrict password changes. It is tempting because usermod does manage account ageing fields, but minimum password age is set with -m or via chage -m.
- ✓
chage -m 7 jsmith
Why this is correct
`chage -m 7 jsmith` sets the minimum number of days between password changes to seven, directly enforcing the required restriction. The `-m` flag defines this minimum interval, so `jsmith` cannot alter the password again until seven days have elapsed, satisfying the stem's constraint precisely.
- ✗
chage -M 7 jsmith
Why it's wrong here
The -M flag sets maximum password age, forcing a change after 7 days, which is the opposite of the requirement. It is tempting because chage is the correct tool for password ageing, and -m 7 would enforce the minimum interval the question asks for.
- ✗
passwd -n 7 jsmith
Why it's wrong here
passwd -n also sets minimum days, but chage is the more common tool for aging.
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
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.