Skip to main content

Command Palette

Search for a command to run...

Day 7 : Linux Group Creation and User Assignment

Updated
2 min read
Day 7 : Linux Group Creation and User Assignment

Situation

The system administration team at xFusionCorp Industries follows a group-based access control model to manage permissions consistently across multiple application servers in the Stratos Datacenter. A new access requirement was raised to ensure controlled and scalable permissions management for development users.


Task

The objective was to:

  • Create a common Linux group named nautilus_developers on all App Servers

  • Ensure the user sonya exists on each server

  • Add the user sonya to the nautilus_developers group

  • Verify group membership to confirm correct access configuration


Action

The following steps were executed on each App Server:

  1. Logged into the server using SSH and escalated privileges to root.

  2. Verified whether the group nautilus_developers already existed.

  3. Created the group where it was missing.

  4. Checked for the existence of the user sonya.

  5. Created the user if not present.

  6. Added the user to the nautilus_developers group using a safe append operation.

  7. Validated user and group configuration using standard Linux identity commands.

Commands Used

(for entering in the server)
ssh username@hostname

(for acccessing the root user)
sudo su -

(first check the group present or not | if not then add that group in system)
getent group nautilus_developers || groupadd nautilus_developers

(check the user present or not then addd it in system)
id sonya || useradd sonya

(Now the thing is add that user in created group)
usermod -aG nautilus_developers sonya

id sonya
getent group nautilus_developers

Result

  • The group nautilus_developers was successfully created on all App Servers.

  • The user sonya exists consistently across the environment.

  • The user was correctly added to the required group without impacting existing group memberships.

How to delete that created user from the system ?

usermod -d <user_name> <Group_name>
usermod -d sonya nautilus_developers

Sample :