Root User Explained – What is the Root User?

rootsusudousers

If you use sudo su - or sudo -s you will get the full root certification "likewise a root user ".

Is this user an official user or is it from canonical?

~$ sudo su -
[sudo] password for username: 
root@lp:~# id
uid=0(root) gid=0(root) groups=0(root)
root@lp:~# pwd
/root
root@lp:~# 

Best Answer

Yes the root user is an official one.

That user comes from a long line of historical influences. It's the conventional name of the user who has all rights or permissions. Most Unix-linke operating systems have a root user. It's not always called "root". You may know the Administrator of Windows operating systems.

Some Linux derivates like Ubuntu allow administrator accounts which provide greater access (not a root account). In some cases, specially Ubuntu, the root user is disabled defaultly, because you can destroy the system with the root user if you do not know what you do.

The root user can do things that a normal user cannot for example:

  • He can change the owner of files/directories
  • He can bind network ports below 1024
  • He has always the uid 0 and can be indentified by this id.
  • Ergo: There is only one root

In Ubuntu (and other Linux derivates) there is a mechanism to gain root priviledges for a short amount of time. One of those mechanisms is sudo. sudo can be used to run a program with root priviledges, but with the users environment.

Edit: Short digression about sudo:

The clue is the so called suid-bit that is on some programs such as sudo. It allows to run the program with root priviledges, even if the root account is disabled (as in ubuntu). sudo itself controls whether the user has the right to execute whatever he wants. So, you execute sudo as root and sudo decides if it executes the given command as root.

The system would not be operable without the root user. There must be a user with the id 0 and the name root (but it can be disabled due to suid/sudo). Or such mechanisms as the suid bit will not work. Hence your will not be able to gain root priviledges. Source: Wikipedia

Related Question