Tutorials

▷ What is a root or super root user

Table of contents:

Anonim

Root is the username, or account, which by default has access to all commands and files on Linux or other Unix-like operating systems. Also known as root account, root user, and superuser.

What is root or super user in Unix-like systems

Root privileges are the powers that the root account has on the system. The root account is the most privileged of the system, and has absolute power over it, that is, full access to all files and commands. Root powers include the ability to modify the system in any desired way, and grant and revoke access permissions, that is, the ability to read, modify, and execute specific files and directories, for other users, including those who are reserved by default.

The permission system in Unix-like operating systems is configured by default to prevent normal users from accessing critical parts of the system, and files and directories belonging to other users. This is because it is very easy to damage a Unix-like system with administrator access. However, an important principle of Unix-like operating systems is the provision of maximum flexibility to configure the system, and therefore the root user is fully empowered.

We recommend reading our post on How to change the user password in Linux

Unix-type systems assume that the system administrator knows exactly what he is doing and that only that individual will use the root account. Thus, there is virtually no safety net for the root user in the event of a careless error, such as corrupting or deleting a critical system file, which could cause the entire system to malfunction.

The fact that all processes started by the root user have root privileges adds to the danger of routinely using the system as root, because even the most widely used and tested application programs contain numerous programming errors, an expert attacker You can often find and exploit such error to gain control of a system when the program is run with administrator privileges instead of using an ordinary user account with its very limited privileges.

A fundamental means of preventing users from directly damaging Unix-like systems or increasing the vulnerability of such systems to damage by others is to avoid the use of the root account, except when absolutely necessary, including by expert system administrators and with experience. That is, instead of routinely logging on to the system as root, administrators should log in with their administrator account and then use the su command. This will provide administrator privileges only as needed and without requiring a new login.

When to use root

Tasks that require root privileges include moving files or directories into or out of system directories, copying files to system directories, granting or revoking user privileges, some system repairs, and installing some application programs. By default, you do not need to be root to be able to read most configuration and documentation files in system directories, although you do need to be root to modify them.

Generally, root privileges are required to install the software in RPM package format, due to the need to write to system directories. However, if an application program is being compiled from source code, it can generally be configured to run from the user's home directory. Root privileges are not necessary for a common user to compile and install software in their home directory. For security reasons, you should avoid compiling software as root.

In order to use the superuser account, the first step is to enable it and assign it a password. To do this, open a terminal and type the following command:

sudo passwd root

With this you can already use the root user privileges, both by using the su command and by directly logging in as the root user. To log in as this user, you just have to close your current session, and enter the root username and password set when the system asks you to enter the login credentials.

This ends our special article on what is a root user, remember that you can leave a comment if you have something to add. You can also share the post on social networks so that it can help more users who need it.

Tutorials

Editor's choice

Back to top button