Corporate policy requires that user "alice" must change her password at least every 90 days, she must be warned 14 days before the password expires, and she may not change the password again for 7 days after setting it. Which single passwd command fulfills all three of these requirements?
The passwd utility can apply multiple aging controls at once. The -x flag sets the maximum password age in days (90 in this case), -w sets the warning period before the password expires (14 days), and -n sets the minimum number of days that must pass before the password can be changed again (7 days). Using all three flags in one command therefore applies the policy in a single step. The other options either omit the warning period, set the minimum age to the wrong value, or swap the minimum-age and warning-period values, so they do not satisfy the stated policy.
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 -x, -w, and -n flags do in the passwd command?
Open an interactive chat with Bash
What happens if you omit the -w flag in the passwd command?
Open an interactive chat with Bash
How does the passwd command enforce password aging 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...
IT & Cybersecurity Package Join Premium for Full Access