View and modify the default ubuntu root password

Source: Internet
Author: User

The default root password of Ubuntu is random, that is, a new root password is generated every time you start the system. Run the following command on the terminal:

Sudo passwd

Enter the password of the current user. enter and confirm the new password. The new password is the new root password. After the modification is successful, enter the following command:

Su root

Enter the new password and then click OK.

To solve this problem, we can modify the root password in this way:

The code is as follows: Copy code

Chasfer @ chasfer-ubuntu :~ $ Sudo passwd root
[Sudo] password for chasfer:

Enter a new UNIX password:
Re-enter the new UNIX password:
Passwd: The password is successfully updated.

Switch to the root user:

The code is as follows: Copy code

Chasfer @ chasfer-ubuntu :~ $ Su-root

Password:

Root @ chasfer-ubuntu :~ #

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.