Linux

Exploring User Management in Linux Systems

User management is a critical aspect of Linux administration. Each user in a Linux system has specific permissions, roles, and files associated with their account. Understanding how to manage users efficiently ensures system security and organized access control.

Understanding User Accounts in Linux

In Linux, users are divided into three main categories:

  • Root user: The superuser with full system privileges.
  • Regular users: Accounts created for standard tasks with limited permissions.
  • System users: Accounts used by services and applications to run processes.

All user information is stored in the /etc/passwd file, while passwords are stored securely in /etc/shadow.

Creating a New User

To create a new user, use the useradd or adduser command:

sudo useradd username

After creating the user, set a password:

sudo passwd username

This ensures the account is ready for login.

Modifying and Managing Users

If you need to change user details such as the home directory or shell, use:

sudo usermod -d /home/newpath username

or

sudo usermod -s /bin/bash username

To lock or unlock an account:

sudo passwd -l username
sudo passwd -u username

Deleting a User

When a user account is no longer needed, remove it safely with:

sudo userdel username

To delete the user’s home directory and mail files as well:

sudo userdel -r username

Viewing User Information

To list all users:

cat /etc/passwd | cut -d: -f1

For detailed information about a specific user:

id username

Conclusion

Efficient user management in Linux ensures security and proper access control. By mastering commands like useradd, usermod, and userdel, administrators can create a secure and well-organized environment.

0xSnow

0xSnow is a cybersecurity researcher with a focus on both offensive and defensive security. Working with ethical hacking, threat detection, Linux tools, and adversary simulation, 0xSnow explores vulnerabilities, attack chains, and mitigation strategies. Passionate about OSINT, malware analysis, and red/blue team tactics, 0xSnow shares detailed research, technical walkthroughs, and security tool insights to support the infosec community.

Recent Posts

How EDR Killers Bypass Security Tools

Endpoint Detection and Response (EDR) solutions have become a cornerstone of modern cybersecurity, designed to…

1 day ago

AI-Generated Malware Campaign Scales Threats Through Vibe Coding Techniques

A large-scale malware campaign leveraging AI-assisted development techniques has been uncovered, revealing how attackers are…

1 day ago

How Does a Firewall Work Step by Step

How Does a Firewall Work Step by Step? What Is a Firewall and How Does…

1 day ago

Fake VPN Download Trap Can Steal Your Work Login in Minutes

People trying to securely connect to work are being tricked into doing the exact opposite.…

3 days ago

This Android Bug Can Crack Your Lock Screen in 60 Seconds

A newly disclosed Android vulnerability is making noise for a good reason. Researchers showed that…

6 days ago

How to Fix MyISAM Table Corruption in MySQL?

In MySQL Server 5.5 and earlier versions, the MyISAM was the default storage engine. So,…

1 week ago