Skip to content
ImagineWorld

User and Group Administration

node_idnode-book_suse-certified-administrator_chapter-04-user-and-group-administration
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num4
chapter_titleUser and Group Administration
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 4 — User and Group Administration

Section titled “Chapter 4 — User and Group Administration”

Linux is a multi-user operating system, meaning many users can work on the same system at the same time, each with different permissions and access levels. It is critical for a system administrator to control who can do what, which commands they are allowed to run, and which system areas they can access. The SCA exam places strong emphasis on user and group administration because it directly affects security, accountability, and stability.

This chapter teaches:

  • How to create, modify, and remove users and groups
  • How Linux stores credentials and identity details
  • How to manage passwords and enforce security policies
  • How to assign privileges through sudo
  • Role-based access patterns used in enterprise environments

By the end of this chapter, you will be able to design access structures that balance usability and security.

Understanding Users, Groups, and Ownership

Section titled “Understanding Users, Groups, and Ownership”

Every file and process on a Linux system is associated with:

  • A user
  • A group

Users are individual identities. Groups are collections of users who share access rights.

FilePurpose
/etc/passwdStores basic user account information
/etc/shadowStores encrypted password hashes
/etc/groupDefines system groups
/etc/sudoersDefines administrative sudo permissions

You will not edit these files manually during normal administration. Instead, use system tools which update them safely.


Terminal window
sudo useradd username
Section titled “Creating a User with Home Directory (recommended)”
Terminal window
sudo useradd -m username
Terminal window
sudo passwd username
Terminal window
sudo userdel username
Terminal window
sudo userdel -r username

Terminal window
sudo groupadd developers
Terminal window
sudo usermod -aG developers username
Terminal window
groups username
Terminal window
sudo groupdel developers

Groups allow shared access to directories, files, and systems, without granting full administrative access.

The system identifies users using numeric values:

  • UID (User ID)
  • GID (Group ID)

Check:

Terminal window
id username

Typical ranges:

  • System users: UID 1 to 999
  • Normal users: UID 1000+

Knowing this helps with audits and troubleshooting access issues.

Passwords are stored in /etc/shadow as encrypted hashes.

To enforce password aging:

sudo chage -l username (view password info)
sudo chage -M 90 username (set max age to 90 days)
sudo chage -m 7 username (set min days to 7 before change)
sudo chage -W 14 username (warn 14 days before expiration)

Enterprises often enforce:

  • Minimum password length
  • Expiration policies
  • Lockout after failed attempts

On SUSE, you can manage this through:

Terminal window
sudo yast users

or by editing /etc/login.defs.

Administrators should avoid logging in as root during daily operations.

Instead, use sudo, which runs specific commands with elevated privileges.

Example:

Terminal window
sudo systemctl restart network

Use:

Terminal window
sudo visudo

Add a line:

username ALL=(ALL) ALL

This grants full sudo rights.

Role-Based Access Patterns (Enterprise Practice)

Section titled “Role-Based Access Patterns (Enterprise Practice)”

Instead of full sudo access, grant only what is needed.

Examples:

Allow user to restart web service only:

username ALL=(root) /usr/bin/systemctl restart apache2

Allow users of group ops to manage logs:

%ops ALL=(root) /bin/journalctl

This approach:

  • Reduces risk
  • Improves accountability
  • Supports audit policies

A telecom provider once faced frequent accidental service outages. Investigation showed multiple junior engineers had full root access, and a harmless typo caused system downtime.

Solution:

  • Root login disabled
  • All engineers given limited sudo based on job function
  • Logging enabled to track every privileged command

Outcome:

  • No accidental outages for over a year
  • Smooth security compliance audits

Professional Linux administration is less about power and more about control.

Always remember the sequence for safe user access creation:

Create → Assign Group → Set Password → Test Login

Or simply:

C A S T

This ensures users are both configured and verified, preventing lockouts.

Complete the following:

  1. Create a new user:
Terminal window
sudo useradd -m analyst
  1. Set password:
Terminal window
sudo passwd analyst
  1. Create a group:
Terminal window
sudo groupadd audit_team
  1. Add the user to the group:
Terminal window
sudo usermod -aG audit_team analyst
  1. Verify:
Terminal window
id analyst
  1. Grant limited sudo to view logs only:
Terminal window
sudo visudo

Add:

analyst ALL=(root) /usr/bin/journalctl

Test:

Terminal window
su - analyst
journalctl

Note what works and what does not.

  1. Why is it considered a bad practice to log in directly as root in production?
  2. How can group-based permissions help avoid giving users unnecessary privileges?
  3. What risks arise from weak or non-expiring password policies?
  4. Why is sudo logging valuable during audits?

Answering these builds operational maturity, not just exam correctness.

In this chapter, you learned:

  • How Linux stores identity and account details
  • How to create, modify, and delete users and groups
  • How to manage password aging and security policies
  • How to assign administrative privileges using sudo safely
  • How to use role-based patterns to prevent mistakes and secure systems

You now understand how to create a safe, organized, and well-structured user environment on a SUSE system.