EX200 Manage security Practice Question
Which command sets the password maximum age for user 'bob' to 30 days?
⚠ Common exam trap
Candidates often think only `chage -M` is valid for setting password max age, but `passwd -x` is also acceptable. The mistake is to mark B as wrong when it is actually correct.
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 30 bob
Both `chage -M 30 bob` and `passwd -x 30 bob` are valid commands to set the maximum password age for user 'bob' to 30 days. `chage -M` is the commonly used and RHCSA-recommended tool for password aging, but `passwd -x` also works on Red Hat systems. Option C (`usermod -e`) sets account expiration, not password maximum age. Option D (`chage -W`) sets the warning period before expiry.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
chage -M 30 bob
Why this is correct
chage -M 30 bob is the standard command for configuring password aging in RHCSA environments, setting the maximum password age to exactly 30 days. This writes to the fifth field of bob's /etc/shadow entry, after which the password will expire and require change. It is the direct equivalent of passwd -x, but is more commonly seen in scripts and documentation.
- ✓
passwd -x 30 bob
Why this is correct
passwd -x 30 bob is a valid, albeit less commonly used, way to set the password's maximum age on Red Hat systems. The -x option directly controls the maximum number of days a password may be used before the user is forced to change it, and it writes the same shadow field as chage -M. Running it as root is required, and the change takes effect immediately for bob.
- ✗
usermod -e 30 bob
Why it's wrong here
usermod -e 30 bob is incorrect because the -e flag modifies the account expiration date, not the password aging policy. The value 30 would be interpreted as a date or day count for account validity, and once that date passes the user cannot log in, regardless of password age. Password maximum age is stored separately in the shadow file and requires chage or passwd, not usermod.
- ✗
chage -W 30 bob
Why it's wrong here
chage -W 30 bob sets the warning period—the number of days before password expiry during which the user is alerted—not the maximum age. Red Hat's chage utility uses -M for max days, -m for min days, and -W for warning days. Using -W only affects the notice timing; it leaves the actual password lifetime unchanged.
Go deeper
Related to this question
About these practice questions
Courseiva writes every EX200 question from scratch — 127 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 EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.