Load: http://www.ubuntuhome.com/ubuntu-12-04-root-pwd-root-login.html
In the original article, there is a small error, and the error is fatal. That is, how to enter the root node to execute the Command, which has been corrected in this article. Red text used below
The root password is not set when Ubuntu 12.04 is installed, and the root account is not used during logon. When we use the root permission, we generally use the sudo command. So when we have installed Ubuntu 12.04, what is the default password for the root account?
In fact, the answer is simple: the root account does not have a password.
Therefore, if you want to log on using the root account, you must first enable the account and reset or add a new password.The following steps will show you how to do this.
First, open the terminal,
Run:Sudo passwd-u Root# To enable our root account. If you regret it, You can executeSudo passwd-l RootTo lock the root user again.
Note: The password entered during sudo execution is your current user password, not the root password. In addition, make sure that your users have such permissions. The configuration file is in/etc/sudoers.
Then create a password for the root user:Sudo passwd Root# Enter the password as prompted. the root password is better than the password of other users, otherwise it will cause some trouble.
Now that the root user is not disabled and has a password, how can I use root to log on?
Run the following command:Sudo sh-C 'echo "greeter-show-manual-login = true">/etc/lightdm. conf'# This allows lightdm to manually enter the root user for logon.
After the command is executed, restart the instance. Click the logon button under lightdm and enter the root account and password to log on to the instance.
We strongly recommend that you do not use root to log on to UbuntuSudo passwd-l RootDisable the root account, because it is very insecure. For example, when you execute Rm-RF/, you accidentally press enter before entering it, then you delete the entire system. If you need the root permission, you can use sudo. You can execute sudo continuously for a period of time without entering the password.