A Linux administrator needs to enforce a new security policy for a user account named app_user. The policy requires that the user's password must expire every 90 days, and the user must receive a warning 14 days prior to expiration. Which of the following commands correctly implements this policy?
The correct command is chage -M 90 -W 14 app_user. The chage utility modifies password-aging attributes.
-M 90 sets the maximum password age to 90 days.
-W 14 sets the warning period to 14 days before expiration.
Why the other commands are wrong:
chage -W 90 -M 14 app_user reverses the values, giving only 14 days of validity and 90 days of warning.
usermod -e 90 app_user sets an account expiration date and expects either a YYYY-MM-DD date or a day count since 1970-01-01, not a password policy.
passwd -x 14 -w 90 app_user also reverses the required values, limiting the password to 14 days and warning 90 days ahead.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `chage` command do in Linux?
Open an interactive chat with Bash
How is `chage -M` different from `chage -W`?
Open an interactive chat with Bash
Can the `usermod` and `passwd` commands be used for password expiration policies?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .