Enabling Root Account in Ubuntu 14.04

Disclaimer first.

Enabling the root account is generally considered to not be a good idea in the GNU/Linux desktop world. Using the graphical desktop as root is even more frowned upon. It’s very easy to mess up file permissions, among others, and is very insecure. There are many fine articles on the Internet explaining the problems with this, and if you are considering enabling this account on your day-to-day machine, I strongly recommend you read up on it and/or ask about it on the Ubuntu Forums before going ahead.

That said, sometimes you just want to mess with a system. Try and break it and fix it. Whatever- it’s your system and you can do whatever you like with it.
Note that I take no responsibility for any results you may experience if you follow the instructions given here. Your machine is your responsibility, and you owe it to yourself and your computer to use it responsibly.

Ubuntu comes with the root account disabled. You can use sudo or gksudo for commands that require root permissions. However, enabling root is very simple. Open a terminal, and type

sudo passwd root

You will be prompted to give root a new password.

To log in to your machine as root at startup via the GUI login manager (Lightdm) you need to edit its config file. This is located at /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf. Edit it with nano (or your preferred editor) by typing the following at the command prompt

sudo nano /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

Add this line to the end of the file.


Save the file and restart your computer. The login screen will now let you specify a user name. Enter root, and give the password. Your root account is now up and running.