What is the root user?

If you use sudo su - or sudo -s you will have full root privileges.

Is this root 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:~# 

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.

The sudo program allows one to perform some action as root, such as run a command, run a shell, or log in (in a terminal only). Using sudo allows one to access root privilege only as needed, conforming to the principle of least privilege. The sudo program also provides control over the execution environment for the commands run with it, i.e. whether root's user configurations or your own are used when commands are run.

In Ubuntu, logging in as the root user directly is disabled by default, to make it less likely that one will cause damage to the system or create security problems by making some mistake as root.

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

  • Change the owner and permissions of files/directories, regardless of the current owner or permissions
  • Bind network ports below 1024

The root user always has the UID 0 and can be identified by this UID. It is possible to create another user called root, but not for there to be two users with the same UID, hence, there is only one root. It is compulsory to have such a user.

Short digression about sudo:

The sudo program works because it has the "suid-bit" (set user id bit). This allows any user to run the program as the owner of the program. Obviously, this is an enormous security risk, and so sudo performs strict checks to see whether the user attempting to run it has the right to use sudo at all, and which commands they are allowed to run with it. This configuration is stored in the file /etc/sudoers, which should only be edited with the visudo command (you need sudo to run visudo). During installation, one sets up a first user account in Ubuntu. This first user will automatically have the right to run any command with sudo.

If the sudo executable or /etc/sudoers have wrong permissions, sudo will refuse to run.