EX200 Essential Tools Practice Question
A system administrator has created a new group named 'ops'. The administrator wants to add the existing user 'alice' to this group as a supplementary group without affecting her current group memberships. Which command should be used?
⚠ Common exam trap
The trap here is that candidates often forget the `-a` flag and choose `usermod -G ops alice`, mistakenly thinking it adds the user to the group, when in fact it replaces all supplementary group memberships.
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
✓
usermod -aG ops alice
The `-a` (append) flag combined with `-G` (supplementary groups) in `usermod` adds the user 'alice' to the 'ops' group without removing her from any existing supplementary groups. Without `-a`, the `-G` flag alone would replace the user's current supplementary group list with only the specified groups, which would remove her from any other groups she already belongs to.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
usermod -aG ops alice
Why this is correct
usermod -aG ops alice explicitly appends alice to the supplementary group ops while preserving any existing supplementary group memberships. The -a (append) flag works in conjunction with -G (supplementary groups) to add the specified group to the user's current group set rather than replacing it. This is the correct, non-destructive way to grant a user access to an additional secondary group.
- ✗
usermod -G ops alice
Why it's wrong here
usermod -G ops alice sets the user's supplementary group list to exactly ops, replacing and thereby removing all other supplementary groups the user may belong to. Without the -a flag, the -G option is destructive: any groups alice was a member of (e.g., wheel, docker) are lost. This is why it must be avoided when the intent is to add the user to an existing group without changing current memberships.
- ✗
groupadd ops alice
Why it's wrong here
groupadd ops alice is syntactically invalid because groupadd is designed to create a new group, not to add users to it. It expects a group name and optionally a GID or other creation options; "alice" would be treated as an extra argument or invalid group name. Even if corrected, the group ops already exists, so groupadd would simply error rather than modify alice's membership.
- ✗
usermod -g ops alice
Why it's wrong here
usermod -g ops alice uses a lowercase -g, which changes the user's primary group (the group recorded in /etc/passwd) rather than modifying supplementary group memberships. This affects the default group for files newly created by alice and her effective primary group, but it does not add ops as a secondary group. It is a valid command but performs a fundamentally different operation than intended.
Go deeper
Related to this question
About these practice questions
One of 127 original EX200 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.