The Ubuntu Linux distribution simply does not want you to create a password for the user ROOT and descend upon the system with a flurry of commands. Read any Ubuntu Forums or Ubuntu-related blog posting and you’ll see a series of help or HOWTO steps that require you to prefix each with the command “sudo“. Which, provided you are a part of the admin group, sudo will allow you tp perform any ROOT or super user task as if you were one.

It is good advice not to break the default security system of Ubuntu by creating a root account that can be directly logged into. Selected users instead elevate themselves as ROOT during specific tasks through the sudo, gksudo and kdesu command containers. However this raises two issues;

  • If operators are operating as ROOT, as part of the Ubuntu admin group, they must have secure passwords consisting of a variety of character types, and be lengthy (numbers, letters of mixed case and symbols). It is important to otherwise give access as needed to these users when it comes to various network services. Disable SSH logins if the user does not need it for example, and definitely do not allow them to access the system via FTP which will send their user password in the clear. If these accounts are able to be easily accessed they can do as much damage as if they were the ROOT user – the systems depends on each of the admin group’s users own security practices.
  • Meanwhile there arises times where directly operating as ROOT at the command prompt will be desired as many commands are involved in the solution, hack or upgrade the system administrator would like to commit. and using the command example below you can temporary become the ROOT user and do just what Ubuntu wanted to avoid removing the su command – run a flurry of commands as ROOT.

First reach a terminal prompt, in the example below we are going to use Gnome Terminal. Once you’ve opened the terminal up to the command prompt issue the command:

sudo -i

sudo -i

Execute the command "sudo -i" as an admin group user at the Ubuntu command prompt to elevate your terminal session to become the ROOT user.

Then provide your user password;

Provide Your User Password to sudo For Elevated admin Group Access

Provide Your User Password to sudo For Elevated admin Group Access

Next you’ll see your console prompt change in two ways (provided you have not changed from the BASH shell). You will first notice that the user prefix now reads “root” and next you may notice that the last character of the prompt has changed from a dollar sign, $, to the number or pound sign, #. See the example below compared to the first screenshot where we showed the user john issuing the sudo -i command.

Gnome Terminal - Ubuntu Shell Prompt Showing User Has Root Access, Logged In As Root

Command Prompt Showing User Has Root Access, Logged In As Root - Notice the user prefix reads "root" and the last character of the prompt is now a "#" (number sign) as opposed to a "$" (dollar sign).

+
There is now a security risk in t hat, I assume, you could lean on the keyboard or the cats can walk on it and accidentally “rm -rf /” your entire installation. As a secondary way to show that you are in fact the super user the Gnome Terminal window title will then change to read as who you are logged in as – root;

Gnome Terminal Shows User Logged in as ROOT via the Titlebar

The Gnome Terminal Shows User Logged in as ROOT on the Titlebar (root@ubuntu)

Hope this helps you tackle such fun projects as downloading, compiling and installing a custom Linux kernel for your Ubuntu system.