Solution to forgetting Ubunturoot Password

Source: Internet
Author: User
Article Title: How to forget the Ubunturoot Password. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Forgot the password for Ubuntu and the root password? Although it is a small probability event, it can be based on the possibility of old occurrence. So what should we do if we forget the Ubuntu root password? Next let's take a look at the solution provided by the principal Ubuntu.

Ubuntu root is disabled by default. During installation, you are not required to set the root password, which is different from the Red Hat system series. To use root in Ubuntu, we can use a terminal to set a password for root.

If sudo passwd root forgets the password of a common user, use root to modify the password. If the root user forgets it, it enters the single-user mode, which is different from the Red Hat system series.

The specific method is as follows:

Enter single user mode:

#1. When the machine is started into grub, use the up/down key to move to the recovery mode of the second line, and press e (note that it is not the carriage return)

#2,

Change ro single to rw single init =/bin/bash, and press ctrl + x to enter single-user mode. (It's a command line, so you have to understand how to use it !) You can change the password of a common user or the root user. Prompt: Press ctrl + alt + delete to restart the system. (I tried to shut down the system by using the command. I can only use this command to restart the system ).

I have tried these things and they are also successful. Please try them! I have read some methods on the Internet and tried some of them! Some methods use the Red Hat system series, and some are incorrect!

To change the password of a common user, run the following command:

Passwd User Name

Related Article

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.