Ubuntu 12.04 root default password? How to Use root login?

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.