Linux user management: default group assignment when creating a new account You have just added a new user named 'kara' using standard Linux tools (for example, useradd). By default, to which primary group is this user typically added?

Difficulty: Easy

Correct Answer: kara

Explanation:


Introduction / Context:
When a new account is created in Linux, the system assigns both a user ID and a primary group. Many modern distributions implement a “user private group” model, where each user gets a primary group with the same name as the username. Understanding this default is important for permissions and collaborative workflows.



Given Data / Assumptions:

  • The account name created is kara.
  • Standard user creation tools such as useradd or adduser are used with default settings.
  • A typical Linux distribution policy (user private group scheme) is assumed.


Concept / Approach:

Under the user private group (UPG) scheme, the system creates a group with the same name as the user and sets it as the primary group. This simplifies default umask and collaborative permission handling, preventing unintended group write access while allowing flexible project groups via supplementary groups.



Step-by-Step Solution:

Create the account: useradd kara (defaults applied).System checks group database for group named kara; if not present, it creates it.The new user's primary group (GID) is set to the group named kara.Verify with: id kara or getent passwd kara and getent group kara.


Verification / Alternative check:

Run id kara. The output typically shows gid=... (kara) confirming the primary group name equals the username. On older or non-UPG systems, the default group might be users, but mainstream distributions have long defaulted to UPG.



Why Other Options Are Wrong:

  • root: Ordinary users are not placed in the root group by default.
  • group/user: These are generic words, not standard default primary groups on modern systems.
  • None of the above: Incorrect because the expected default is the group with the same name as the user, here kara.


Common Pitfalls:

Assuming the default group is users on every distribution or forgetting that enterprise policies may override defaults. Always verify with id username when unsure.


Final Answer:

kara

More Questions from Linux

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion