Enable root user in Ubuntu 12.04 LTS

You may have noticed by now you can’t access root account or login to the root account and also that in Ubuntu you never set a root password during installation, fixing this is actually pretty easy but I really recommend against doing this if you are new to Linux as its easy to mess up your entire system running as root. All you have to do to enable the root account is change the root password by using the following command.

sudo passwd root

A prompt will appear in terminal asking you to type the new password. If you wish to disable the root account again later on all you have to do is lock it by running this command.

sudo passwd -l root

Lastly if you simply wish to run a terminal as root in your regular account simply execute this command in console.

sudo su

To switch your terminal window back to your account simply type exit and hit enter.

(Visited 43 times, 1 visits today)

Leave a comment

Your email address will not be published. Required fields are marked *