Linux User Management: Creating and Managing Users and Groups

Linux yash December 12, 2025 2 mins read

Learn how to create users, assign groups, and manage permissions in Linux using useradd, usermod, passwd, and groupadd.

πŸ‘₯ Why User Management Matters

Linux is a multi-user operating system. User and group management is essential for:

  • Securing access

  • Organizing permissions

  • Enabling controlled collaboration

  • Maintaining system integrity

System administrators rely on user and group configurations to ensure that each user has the correct level of access to files, commands, and system resources.


πŸ” Key Commands Overview

Below is a quick reference table of essential user and group management commands:

Command Purpose Example
useradd Create a new user sudo useradd alice
passwd Set or change a user’s password sudo passwd alice
usermod Modify user properties sudo usermod -aG sudo alice
groupadd Create a new group sudo groupadd developers
groups View user’s groups groups alice
id View UID, GID, and groups id alice

🧠 Managing Groups

Groups allow you to collectively assign permissions to multiple users. Instead of manually assigning permissions to each user, you assign them to a group and manage the group itself.

βž• Add a User to a Group

 
sudo usermod -aG developers alice

πŸ“‹ View All Groups

 
cat /etc/group

πŸ” Inspecting User Info

πŸ“‘ View All Users

Linux stores user information in /etc/passwd:

 
cat /etc/passwd

🧾 View Login History

 
last

This shows who logged in, from where, and for how long.


🧰 Pro Tips for Sysadmins

  • Always use sudo for administrative tasks.

  • Lock a user account:

     
    sudo usermod -L alice
  • Unlock user account:

     
    sudo usermod -U alice
  • Delete a user and their home directory:

     
    sudo userdel -r alice

πŸš€ What’s Next?

In the next post, we’ll explore:

Linux Process Scheduling

Using:

  • cron

  • at

  • systemd timers

…to automate tasks and optimize productivity.

Advertisement

Y
yash

1 post published

Sign in to subscribe to blog updates