Courseiva
User and Group ManagementeasyMultiple ChoiceObjective-mapped

LFCS User and Group Management Practice Question

An administrator wants to change the primary group of user 'jane' from 'staff' to 'developers'. Which command accomplishes this?

⚠ Common exam trap

Many candidates confuse the `-g` (primary group) and `-G` (supplementary groups) options of `usermod`, leading candidates to mistakenly choose the uppercase `-G` option when the question explicitly asks for a primary group change.

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 -g developers jane

The `usermod -g` command changes the primary group of a user. The `-g` option specifies the new primary group (by name or GID), and the user's existing primary group is replaced. This directly accomplishes the administrator's goal of changing jane's primary group from 'staff' to 'developers'.

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 -g developers jane

    Why this is correct

    Correct: -g sets the primary group.

  • usermod -G developers jane

    Why it's wrong here

    -G adds secondary groups, not primary.

  • groupmod -g developers jane

    Why it's wrong here

    groupmod modifies group attributes, not user's group.

  • chgrp developers jane

    Why it's wrong here

    chgrp changes group ownership of files, not user's group.

About these practice questions

One of 507 original LFCS 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.