The Ubuntu system starts by default to login with the user name entered when the system is installed. such as: Rusky login System as a non-root account, when we do some operation, the system prompts for the root password to be entered. But we didn't set the root password. At this point, you can set a password for root by doing the following:
[Email protected]:/$ sudo passwd
[sudo] password for Rusky:
Enter New UNIX Password:
Retype new UNIX Password:
Passwd:password updated successfully
[Email protected]:/$ su Root--switch to the root account, enter the password set above
Password:
[Email protected]:/#
The root account in Ubuntu is disabled by default. In this case, if you want to use root permissions to do something, you will need sudo instructions. =
Activate root account
Sudo-i
sudo passwd root
Enter your existing password
Enter Password for root
Confirm Password for root
Block Root Account
If you activate the root password and want to re-block it. After you activate the root account, block it using:
sudo passwd-l root
This will lock the root account.
Ubuntu system root Account Unlocked