Add a root user for the ubuntu operating system and a root user for the ubuntu Operating System
1: After a virtual machine is installed and the Ubuntu operating system is installed, you can log on to the system and find that the user except the user you set is a foreign user. In factUbuntuInRootThe account is disabled by default, so this account is not used during login. However, if you switch to the root account every time, it will be very cumbersome. Therefore, the following section sets the root account.
(This picture is not made by yourself to make it easier for everyone to perform the operation)
2: first
Open the terminal and open the root account: sudo passwd-u root
Enter the current user password (that is, you set your own account password)
Then
Set the password for the root account: sudo passwd root
Set the root password. Enter the password twice.
Then
Test root Account: su-
Enter the root password and enter the root terminal.
Then
The root account is successfully enabled. exit the root account.
3: Now set up the root account, re-open the terminal, under your account, and then
Enter sudo gedit/usr/share/lightdm. conf. d/50-ubuntu.conf
Enter the above sentence, open the following text, and then
Enter this sentence in the third line of this text: greeter-show-manual-login = true
Save and click save.
After closing, return to the terminal window and enter sudo passwd root and press Enter;
Enter the password twice after you press Enter.
After the instance is shut down and restarted, you can log on with the root permission.
When logging on, you should first enter root in the second one, and then enter the password you set. (It should be noted that the num lock number lock problem is that re-login to ubuntu is equivalent to the number lock is closed, you need to manually click)