What is the Ubuntu root password?

Source: Internet
Author: User

After Ubuntu is installed, the root user cannot log on and does not have the default password, because you have not set the password for the root user. Your first user is in the admin group, so he can set a password for the root user.

Set a password for the root user. The specific step is to open the terminal (Application -- attachment -- terminal), and then enter the following command

Sudo passwd Root
Enter the password and confirm the password. For example
[Sudo] password for you: ---> enter your password (your current user password) and do not echo
Enter new Unix Password: ---> set the root password
Retype new Unix Password: --> repeat this
In this way, your root password is set.

The second step is to enable the root user because the root user is disabled by default. Therefore, you must go to system> System Management> logon window)
Click the "Security" option page and check the check box before "Allow Local Administrator Logon.

Then log out and you can log on!

Sudo passwd Root

Sudo gedit/etc/TPD. conf

Allowroot = false to allowroot = true

CTRL + q

Log out and log on again.

3 close: sudo passwd-l Root

I really don't know what to do. Too many small Linux releases have a headache for users !!

For example, Ubuntu has to be used recently. Because it does not set the root password during installation, it is obviously unable to log on as root because it does not have the initial password, you cannot switch to the root node through "Su. This solution avoids system tampering due to excessive permissions and allows you to use "sudo" When Using Super User Permissions. However, it is not fun to use it. The solution is as follows:

1. Set the root password:
(1) log on to Ubuntu using the Administrator account during installation
(2) Open the terminal and execute the command: sudo passwd root, set the root password, and repeat the password.
In this way, you can use Su to switch to root on the terminal.
* Note: if you do not want to switch to the root account, use sudo passwd-l root to block the use of the root account.

2. Support for root logon Gui:
You can modify the/etc/mcm. conf file to allow the root user to log on directly. In this file, change "allowroot = false" to "allowroot = true" to switch the user.
 

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.