Linux System Administration

0 of 85 lessons complete (0%)

Managing User Accounts

Principles of User Management in Linux

You don’t have access to this lesson

Please register or sign in to access the course content.

n Unix-like systems, users are classified into different types based on their roles and permissions. Each user type has specific actions they are allowed to take, which helps in managing security and access control effectively. Below is a combined overview of the types of users and the actions they are allowed to take:

Types of User Accounts in Unix

  1. Root User (Superuser)
    • Description: The root user is the system administrator with full control over the entire system. It has unrestricted access to all commands, files, and system resources.
    • Privileges: Can perform any system operation, including managing other users and changing system configurations.
    • Username: Typically root.
    • Login Prompt: # indicates the root user in the command prompt.
  2. Regular Users (Normal Users)
    • Description: These are standard accounts created for individuals using the system. Each user has their own files, environment, and permissions.
    • Privileges: Regular users are restricted to their own files and can perform actions within their home directory. They may need elevated privileges (sudo) for system-wide tasks.
    • Home Directory: Typically located in /home/username.
    • Usage: Used for daily tasks such as editing files, running applications, and managing personal files.
  3. System Users (Service Accounts)
    • Description: System users are used to run system services or daemons. These accounts usually do not have login privileges.
    • Privileges: These accounts have limited access, mostly restricted to running specific services such as web servers or databases.
    • Examples: Accounts like www-data, mysql, and postfix are examples of system users.
  4. Guest Users
    • Description: Guest accounts are temporary accounts that offer short-term access with limited privileges.
    • Privileges: Restricted to basic activities like creating temporary files. They typically have no persistent storage or access to critical system files.
    • Example: A guest account might be created as guest, with a home directory that is wiped after logout.
  5. Pseudo Users
    • Description: These accounts exist for system-level tasks and are not assigned to human users. They do not allow logins.
    • Privileges: Serve as placeholders for system processes with limited privileges.
    • Examples: nobody, bin, sync.

Actions Allowed by User Type

ActionRoot UserRegular UserSystem UserGuest User
Modify any file or directoryYesOnly own filesService-specificNo
Install or remove softwareYesNo (unless sudo)NoNo
Start or stop system servicesYesNoService-specificNo
Create or delete user accountsYesNoNoNo
Change ownership or permissions on any fileYesOnly own filesNoNo
Run processes and terminate themYesOnly own processesService-specificOnly own processes
Access all system logsYesLimitedService-specificNo
Use system-wide network resourcesYesYesYesLimited

Detailed Actions by User Type:

  1. Root User (Superuser):
    • System Management: Install/remove software, manage user accounts, change system settings.
    • File System Management: Access or modify any file or directory, manage file permissions.
    • Process Management: Start/stop services, manage system processes, kill any process.
    • Security & Maintenance: Apply patches, reset user passwords, create cron jobs for system tasks.
  2. Regular Users (Normal Users):
    • File Management: Create, edit, and delete files in their own directory.
    • Process Management: Start and stop their own processes, view their process status.
    • System Interaction: Install user-space software, run commands with sudo if granted permission.
    • Networking: Access network services and resources, such as connecting to the internet.
  3. System Users (Service Accounts):
    • Service-Specific Tasks: Run services like web servers or databases.
    • Limited Privileges: Access files and resources necessary for the service they run.
    • No Direct Login: Typically do not log in directly or run general tasks.
  4. Guest Users:
    • Basic Tasks: Create and edit temporary files, access publicly available system applications.
    • Restrictions: Cannot modify system settings or access files owned by others.
    • Temporary Environment: Files and changes are often deleted after logout.
  5. Pseudo Users:
    • System Processes: Own system files and directories, run specific system processes.
    • No Login or Regular Interaction: Serve as internal accounts for the system, such as nobody or bin.

This overview of types of user accounts and their allowed actions provides a clear picture of how Unix systems manage user roles, ensuring a balance between security and functionality. Each user type has specific permissions that control what actions they can take, with the root user having the most power and guest users having the least.