This article, it’s going to be a first thing to do (in my opinion), after installing Ubuntu. By default in Ubuntu the Super User Root is disabled for security reasons. Thus, when you want to act like a SuperUser you have to call sudo actions instead of using a su at an administering session in Terminal. There are times that this security is useful, but there are times that this procedure is annoying. The point of view is very important to decide whether this has advantages or disadvantages. Read this article to see some of them.
By default, root account password is locked in Ubuntu. So, when you do su –, you’ll get Authentication failure error message as shown below.
$ su - Password: su: Authentication failure
Enable super user account password on Ubuntu
First, set a password for root user as shown below.
$ sudo passwd root [sudo] password for giorgos: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Now with the new password you can login as super user with su command
$ su - Password: #
Disable super user account password on Ubuntu
Later if you don’t want to use su anymore, you can lock the root user password using one of the methods shown below
$ sudo passwd -l root
( or )
$ sudo usermod -p '!' root