How to Enable and Disable root account in Ubuntu

Enabling the root account in ubuntu is rarely necessary. Almost everything you need to do as root of an Ubuntu system can be done via sudo or gksudo. If you really need a persistent root login, the best alternative is to simulate a root login shell using the following command…
$sudo -i ( same as sudo su)

To enable the root account

$ sudo passwd root

To Disable the root account

$sudo usermod -p ‘!’ root

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s