Why Delete the Root Account Password?
Deleting the Root account is a secure and advisable system security measure. Imagine a Linux computer with a complex user password but a weak root password; it becomes vulnerable to attacks or unauthorized access.
However, having no password for the root account is extremely secure. No root password means no one can log in, denying hackers the opportunity for unauthorized access to your computer.
Furthermore, even without using the root account, users can still modify system settings using sudo commands by entering sudo -s or sudo su.
Removing the Root Password
The process of removing the root password is remarkably straightforward.
Firstly, open the Terminal window and acquire root access by entering sudo -s. This command grants you root privileges without logging into the root account.
Next, eliminate the root password with the command: 'passwd --lock root'
This command will disable all future logins to the root account.
Alternatively, you can remove the current password entirely, ensuring nobody knows what your password is: 'passwd -d root'
To reactivate the root account, enter the command: 'sudo passwd root'
The system will prompt you to enter a new password, and your root account will be reactivated with the new password.
Here, Mytour has guided you through the simplest method to disable the root account for Linux users, a trick that works best for Ubuntu, one of the most widely used Linux operating systems.
(According to Maketecheasier)