Summery: This article will show you how to enable and disable root account in Ubuntu.

In a computer operating systems there is a special user account which is used for system administration. Depending on the operating system name of this account vary. In windows environment this account is known as the administrator or admin account. When it comes to Linux this account is known as “root”.

When compared with other user accounts this root user has the capability of making unrestricted, potentially adverse system wide changes. Therefore, it is recommended that most users and applications to run under an ordinary account to perform their day to day work.

Also Read: How To Fix Sudo Command Not Found in Debian

Because of the above-mentioned reasons in many Linux distributions by default the root user account is disabled. In Ubuntu Linux also the root user account is disabled by default for security reasons. This tutorial explains how to enable and disable the root user account in Ubuntu.

Enable Root User Account in Ubuntu

To enable the root account in Ubuntu you just need to set a password for the root user. In Linux, you can set or change the password of a user account using the “passwd” command. Open your terminal and run the following command:

sudo passwd root

You will be prompted to enter and confirm your new root password.

Enable Root User Account in Ubuntu

Once you enter and confirm the new password you will able to login with the root account using the password you entered.

Disable Root User Account in Ubuntu

In case if you want to disable the previously enabled root user you can do it by setting the root password to expire. To do that open your terminal and run the following command:

sudo passwd -l root
Disable Root User Account in Ubuntu

Also Read: How To Install and Use GPG Encrytion In Linux


0 Comments

Leave a Reply

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