For new users who just starting with Ubuntu and wanting to know about the root account, here’s a brief post that gives you a little insight about the root account and how / why to use it.  You see, every Ubuntu edition comes with a root account.

The root account is also known as the administrator account. Think of the root account as an account with god-like rights. It can delete any file, any folder and make any change to the system. The power of the root account is limitless.

Because the root account is so powerful, it is automatically created with a password value with no possible encrypted match on the system, which makes it unusable to sign on with. So instead of directly logging on with the root account, users are encouraged to use the sudo command.

The sudo command allows authorized users to temporary elevate their privileges using their own password without knowing the root password or using the root account.

If you still want to enable and logon with the root account for other unknown reasons, simply give it a password. This will enable the root account.

sudo passwd

 

The commands above will enable the root account but to sign on as the root user, you must enable manual logon since it’s now been disabled in Ubuntu. The manual logon option allows for users to type their logon name as well as the password for the account instead of just selecting an account from the logon screen.

To enable manual logon with Ubuntu 13.10, open the config file by running the commands below

 sudo gedit /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf

 

Then add the line below as shown in the image.

greeter-show-manual-login=true

 

ubuntu-root-logon

 

Save the file and restart your computer.

For earlier versions of Ubuntu, you may find this config file in a different location under /etc/lightdm. It may be called lightdm.conf.

On the logon screen, you can then type the root username with password to sign on.

 

ubuntu-root-logon-1

 

If you want to lock / disable the root account, run the commands below.

sudo passwd -l root

 

Enjoy!

Frequently Asked Questions

How to enable the root account in Ubuntu?

To enable the root account in Ubuntu, you can use the command 'sudo passwd'. This will prompt you to create a password for the root account.

What is the difference between the root account and sudo command in Ubuntu?

The root account in Ubuntu has god-like rights and can make any system changes, while the sudo command allows authorized users to temporarily elevate their privileges without knowing the root password.

How can I log in as the root user in Ubuntu?

To log in as the root user in Ubuntu, you need to enable manual logon. You can do this by editing the configuration file '/etc/lightdm/lightdm.conf.d/50-unity-greeter.conf' and adding the line 'greeter-show-manual-login=true'.

Why is it recommended to use the sudo command instead of logging in directly with the root account?

It is recommended to use the sudo command in Ubuntu instead of logging in directly with the root account because the root account is so powerful that it can cause unintended system changes or deletions if not used carefully.

What is the default state of the root account in Ubuntu?

The root account in Ubuntu is created with a password value with no possible encrypted match on the system, making it unusable to sign in directly. Users are encouraged to use the sudo command for elevated privileges.

Can I delete any file or folder using the root account in Ubuntu?

Yes, the root account in Ubuntu has the power to delete any file or folder on the system. It is recommended to use this power with caution to avoid accidental data loss.

How does the root account differ from a regular administrator account in Ubuntu?

The root account in Ubuntu is known as the administrator account with god-like rights, allowing it to make any system changes. Regular administrator accounts have elevated privileges but are not as powerful as the root account.

What are the risks of enabling and using the root account in Ubuntu?

Enabling and using the root account in Ubuntu poses risks of accidental system changes or deletions that could potentially harm the stability and security of the system. It is advisable to use the sudo command for controlled privilege elevation.