By Default, Root account is disabled in ubuntu. Instead, users are advised to make use of a tool by the name of sudo to carry out system administrative duties. Sudo allows an authorized user to temporarily elevate their privileges using their own password instead of having to know the password belonging to the root account.
Enable root account
- if you want to enable root account,simply give it a password.
- Sudo will prompt you for your password, and then ask you to give a new password for root as shown below:
[sudo] password for username: (enter your own password) Enter new UNIX password: (enter a new password for root) Retype new UNIX password: (repeat new password for root) passwd: password updated successfully
Disable root account
- To disable the root account, use the following:
sudo passwd -l root