While configuring a temporary account on a Linux server, you need to create a local user called analyst so that the account (a) receives a home directory copied from /etc/skel, (b) belongs to the existing docker supplementary group, (c) uses /bin/zsh as its login shell, and (d) is automatically disabled after 2025-12-31. Which single command meets all of these requirements?
useradd -m -e 2025-12-31 -A docker -s /bin/zsh analyst
The command useradd -m -e 2025-12-31 -G docker -s /bin/zsh analyst achieves every stated goal in one step:
-m creates the home directory and populates it from /etc/skel.
-e 2025-12-31 sets the account-expiration date.
-G docker adds the user to the docker supplementary group.
-s /bin/zsh selects the login shell.
The other options each miss at least one requirement or use invalid switches:
useradd -M … -g docker … suppresses home-directory creation and makes docker the primary group instead of supplementary.
useradd -m -E … fails because -E is not a valid option for useradd; expiry needs lowercase -e.
useradd -m -e … -A docker … is invalid because useradd has no -A option. Therefore only the first command satisfies all four conditions.
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 -m option do in the useradd command?
Open an interactive chat with Bash
What is the difference between -G and -g in the useradd command?
Open an interactive chat with Bash
How does the -e option in the useradd command work?
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 .