Question 6 of 527
Manage users and groupsmediumMultiple SelectObjective-mapped

Quick Answer

The correct commands to change the primary group of an existing user are `usermod -g` and `gpasswd -a`. The `usermod -g` command directly sets a new primary group for the user by modifying the GID field in `/etc/passwd`, while `gpasswd -a` adds the user to a group but does not alter the primary group—it only affects supplementary membership, which is a common point of confusion. On the Red Hat Certified System Administrator EX200 exam, this distinction tests your understanding of group management fundamentals, often appearing in performance-based tasks where you must reconfigure user permissions without breaking existing access. A frequent trap is mistaking `usermod -aG` (which adds supplementary groups) for the primary group change; remember that the lowercase `-g` flag is the only one that modifies the primary group. For a quick memory tip: think "lowercase g for the group that gets the gold" (primary), and "uppercase G for the guest list" (supplementary).

EX200 Manage users and groups Practice Question

This EX200 practice question tests your understanding of manage users and groups. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which TWO commands can change the primary group of an existing user?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "primary"

    Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

Question 1mediummulti select
Full question →

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

The `usermod -g` command (not `-aG`, which adds supplementary groups) changes the primary group of an existing user. The `gpasswd -a` command adds a user to a group, but it does not change the primary group; it only affects supplementary group membership. Therefore, neither option A nor B is correct for changing the primary group. The correct commands are `usermod -g` (to set the primary group) and `usermod -G` (to set supplementary groups, but not the primary).

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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

    Why this is correct

    The -aG option appends the user to specified supplementary groups.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • gpasswd -a

    Why this is correct

    gpasswd -a adds a user to a group.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • vigr

    Why it's wrong here

    vigr edits the group file, but not a command to add user to group directly.

  • groupmems -a

    Why it's wrong here

    groupmems -a adds a user to a group but requires interactive mode; not as straightforward.

  • useradd -G

    Why it's wrong here

    useradd -G sets supplementary groups during user creation, not for existing users.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is confusing the `-g` (primary group) and `-G` (supplementary groups) flags with `usermod`, and assuming `gpasswd -a` or `groupmems -a` can change the primary group when they only manage supplementary membership.

Trap categories for this question

  • Command / output trap

    vigr edits the group file, but not a command to add user to group directly.

Detailed technical explanation

How to think about this question

The primary group of a user is stored in the `/etc/passwd` file (the GID field), not in `/etc/group`. Changing it requires updating that field, which `usermod -g` does by modifying the GID in `/etc/passwd`. The `-g` flag accepts either a group name or GID, and the group must exist. A subtle behavior: if the user is the sole member of their current primary group, changing the primary group does not remove them from the old group; they remain as a supplementary member unless explicitly removed.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the EX200 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Manage users and groups — This question tests Manage users and groups — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: usermod -aG — The `usermod -g` command (not `-aG`, which adds supplementary groups) changes the primary group of an existing user. The `gpasswd -a` command adds a user to a group, but it does not change the primary group; it only affects supplementary group membership. Therefore, neither option A nor B is correct for changing the primary group. The correct commands are `usermod -g` (to set the primary group) and `usermod -G` (to set supplementary groups, but not the primary).

What should I do if I get this EX200 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.