How to enable the root account - Ubuntu

In Linux (and Unix in general), there is a superuser named root. The Windows equivalent of root is Administrator. The superuser can do anything and everything, and thus doing daily work as the superuser can be dangerous. You could type a command incorrectly and destroy the system.
By default, the root account password is locked in Ubuntu. This means that you cannot login as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users to run certain programs as root without having to know the root password. 
Logging in  as root may cause very serious trouble but if you really need to enable the root account you have to set a password for it using the command:
 sudo passwd













If you have enabled your root account and wish to disable it again, use the following command in terminal:
sudo usermod -p '!' root
 
Success! 

No comments: