Many types of Linux User Accounts

Today we will learn about Many types of Linux User Accounts. Every user that interacts with a Linux system has an account. But apart from the standard user, there are several other types of user accounts in Linux. User accounts are a key concept in Linux. Primarily, they help you manage access control to your system. Additionally, they allow multiple users to log in at any one time and are critical to the security of a system.

Without user accounts, it would be difficult to control who has access to which parts of the Linux system. There are four main types of user accounts in Linux: here’s what you need to know about them.

User Account Identifiers

A Linux system can have multiple user accounts, so, to be able to uniquely identify each account, Linux uses user identifiers (UIDs) and group identifiers (GIDs). The foundation of any user account revolves around its UID.

Additionally, each user account is associated with a specific group and is therefore assigned a GID. Of course, a user account can belong to different groups. In addition to user and group identifiers, each user account has a UID within a certain range that corresponds to the account it is associated with.

1. Superuser Account

In Linux, the superuser account is known as your system’s default administrator root. Every Linux system must have at least one root user account. As part of administrative privileges, super-user accounts have unlimited access and control over a system with other users. This is why you must set a strong password for the root account.

The superuser account always has UID 0 and is also part of group ID 0.

Unlike other accounts, the home directory of the superuser is in the top-level directory, located at /root.

2. Regular Accounts

All other users that are added to a Linux system later are known as regular accounts or standard accounts. Such accounts have limited access and control over the system, but can gain administrative rights using the sudo or su commands.

On modern Linux systems, regular users have UIDs with four-digit numbers starting at 1000. In fact, the first user account you create on your system will usually have UID 1000.

By default, regular user accounts have their home directory in the /home directory. If you use the ls command to list the home directory, you’ll get a better picture of the current users on your system.

Another important feature of regular accounts is that they have a default shell, and in most Linux distros this is the Born Again shell (bash). You can change your default shell if you want, for example, set it to Z shell or C shell.

3. System Accounts

The operating system creates the system account during its installation. System accounts are used to run operating system components but not with superuser privileges.

Most system accounts have user identifiers between 1 and 99, typically two numbers. In some cases, system accounts have a three-digit UID between 500 and 999.

An example of a system account is Apache Web Server, which has a UID and GID number of 48.

System accounts do not have a dedicated home directory or a shell, because they do not need a login during their lifetime.

4. Service Accounts

Last but not least, let’s take a look at the Service Accounts. Service accounts are somewhat similar to system accounts: they are created whenever a service is installed on your system.

For example, when you install a SQL Server database, the system creates an associated account to perform SQL Server-related operations.

Like system accounts, service accounts do not have a home folder or a default shell. They are assigned /sbin/nologin to deny logins.

Service accounts typically have a three-digit UID, between 100 and 999.

Some of the prominent services that you will search for in your system are systemd, GNOME Display Manager (GDM), CUPS printing service, etc.

User accounts are key to managing users in Linux

There are 4 main user accounts on Linux and they are important for user management and the overall security of your system.

Since users are a key component of an OS, every system administrator should learn how to manage users on Linux.