Courseiva
hardMultiple ChoiceObjective-mapped

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 (absolute date), not password age.

  • 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 number of days before expiration to warn the user, not the maximum age.

  • chage -M 90 <username>

    Why this is correct

    This sets the maximum password age to 90 days; the user must change the password after that period.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 979 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 →

How Courseiva writes practice questions · Editorial policy

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.