Root access on Ubuntu

By default on Ubuntu systems the root account is disabled.

To run commands on console as root you have to use the sudo command in order to have root privileges on the required operation.

For instance, you can edit the X11 configuration file using root credentials with the following command:

sudo gedit X11/xorg.conf

Sometimes, you need to run a batch of commands on your console as root, to do this, usually on all the unix like systems you use the command su [Super User] and then you type the root’s password.

In Ubuntu, by default, this option is disabled since the root account itself is disabled.

In order to enable the root account with your password and then use the su command, you have to run the following command:

sudo passwd root

In other words, using the sudo command, you run, with root priviliges the command passwd (set a password for a user) on the root account.

Type twice your password and that’s all, you will be able to use the su command at your convenience.

Leave a comment