π₯ 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
π View All Groups
π Inspecting User Info
π View All Users
Linux stores user information in /etc/passwd:
π§Ύ View Login History
This shows who logged in, from where, and for how long.
π§° Pro Tips for Sysadmins
-
Always use
sudofor administrative tasks. -
Lock a user account:
-
Unlock user account:
-
Delete a user and their home directory:
π What’s Next?
In the next post, we’ll explore:
Linux Process Scheduling
Using:
-
cron -
at -
systemd timers
…to automate tasks and optimize productivity.
FAQs (0)
Sign in to ask a question. You can read FAQs without logging in.