Tutorials Ubuntu ubuntu 18.04

How To Enable or Disable Root Account In Ubuntu

enable root account
Written by admin

In this short tutorial, we will show you the method to enable or disable root account in ubuntu. Administrative root account is set to disable by default in ubuntu operating system. This means that you cannot login as root directly or use the su command to become the root user. Root account is mostly used to gain root privileges. It is not wise to use root account or root login in every activities that you perfrom on Ubuntu.

Step To Enable Root Account in Ubuntu

You can easily enable root account in ubuntu with the help of following command. You need to provide the password in order to enable root account.

$ sudo -i 

Change Root Password in Ubuntu.

You can easily change root password with the help of following command. Open your terminal and input the following command.

$ sudo passwd root

It will ask you the new unix password two times.

Meanwhile, Inorder to disable root account in ubuntu.

How To Disable Root Account In Ubuntu?

Run the command below so that you can set the password to expire.

$ sudo passwd -dl root

About the author

admin