After installing Ubuntu, by default the administrative root account is disabled or locked. You can not log in as root until you enable your root account, so you must always use the sudo command to execute any programs as root. This tutorial will help you to unlock root account in Ubuntu. Great power comes with great responsibilities. The root account is disabled by default in most of the Linux distributions so that users don’t delete or change any important file. So do not enable root account unless you really need it. Follow the steps below to unlock root account in Ubuntu.
Steps to enable root account in Ubuntu
1. Press ctrl + tab + T to open Terminal.
2. Now, in Terminal type the following command:
sudo passwd root
(This will set a password for the root account. As to change root password we need to execute the command as root, we are adding sudo before passwd root.
3. Type your desired password for the root and then retype the password.
4. You can see the message that PAssword updated successfully.
5. Now, try to log in to root account using su command:
su – root [** If you do not use “-” sign you will be logged in as root but you PWD (present Working Directory) will not be changed to /root]
Enter the password.
You will be logged in as the root user.
Leave a Reply