EX200 Manage users and groups Practice Question
A new employee named asmith needs a user account with a home directory and a specific UID of 1500. Which command accomplishes this?
⚠ Common exam trap
A common mix-up: candidates confuse `-u` (UID) with `-U` (create user group) and mistaking `-h` for home directory instead of the correct `-d` flag.
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
✓
useradd -m -u 1500 asmith
`useradd -m -u 1500 asmith` creates the user asmith with a home directory (via `-m`) and assigns a specific UID of 1500 (via `-u`). The `-m` flag ensures the home directory is created if it does not exist, which is required by the question.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
useradd -m -u 1500 asmith
Why this is correct
The `-m` flag tells `useradd` to create the user's home directory (`/home/asmith`) immediately, and `-u 1500` explicitly assigns UID 1500. This is the correct way to create a new account for asmith with both a usable home directory and a known UID for ownership purposes.
- ✗
adduser -uid 1500 asmith
Why it's wrong here
On RHEL, `adduser` is only a compatibility symlink to `useradd`, and the syntax `-uid` is invalid — UID must be specified as `-u 1500`. Even if the symlink resolved, the option parser would reject `-uid`, so no account with UID 1500 would be created.
- ✗
useradd -h /home/asmith -u 1500 asmith
Why it's wrong here
In `useradd`, `-h` is not a valid option; it is commonly used by other commands to print help, but here it would cause `useradd` to exit with an error. To specify and create the home directory on RHEL, you must combine `-d /home/asmith` with `-m` or rely on the default location with `-m` alone.
- ✗
useradd -d /home/asmith -U 1500 asmith
Why it's wrong here
The `-U` flag creates a new group with the same name as the user, not a UID; the correct UID flag is lowercase `-u`. Additionally, while `-d /home/asmith` sets the home directory path, it does not create it without `-m`, so asmith would have a home directory entry but no actual directory on the filesystem.
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.