What is the way Linux restores the root password

Source: Internet
Author: User

Linux root password forgotten, how to recover? Although this is not a very common situation, but you have not logged into the system for a long time will forget it. Do not say is the Linux root password, on the ordinary account and password you have a period of time without login will forget, this is a very normal thing Ah! Linux root is the most privileged user of the Linux system, and once the password is forgotten it will bring a lot of trouble, how can you restore the Linux root password? So let's talk about two ways to restore the Linux root password.

  First recovery mode: single-user-mode password recovery

1, restart the Linux system, see the following interface, press the "E" key;

2, press the "E" key after we will see the following interface, press the "E" key again;

3, after the last "E" key we came to the following interface, if there is not the same as this picture, find the line with Kerner typeface, and then press the "E" key again;

4, we will enter the following page, after the quiet empty a lattice and then input single;

5, after the completion of the hit return (ie enter key) will return to the following interface, in this interface press "B";

6, immediately we will enter such a page;

7, enter the following categories to represent the change of the root password, we can see that prompted an update successfully to change the success, and then enter the reboot restart, will enter the user login interface, the input just changed the password can be landed;

  Second Recovery model: Disc recovery (mainly via CD-ROM into rescue mode for recovery)

1, assume that we can not use the first way to fix the password, the Linux installation shutdown into the optical drive, and then start the computer we will see the following page;

2, and then enter the contents of the picture, followed by carriage return, the system will enter the rescue mode;

3, to enter the rescue mode, the request we choose the language generally we default carriage return to determine the good;

4, choose the keyboard mode;

5, prompts whether to set up the network card information, generally does not set, we use the TAB key to switch to No can;

6, then will reach this interface, we direct return, it will automatically detect the system;

7, after the completion we will see the following interface, he will display the system's mount information, we direct return select OK;

8, and then according to type the following content to complete, and then restart the computer on the line, note that before the reboot we want to disconnect with the optical drive, and then will enter the user login interface, input before the change of the password can be landed;

Note: This version is a password recovery for the Linux Red Hat 5.0 system, but it also applies to root password recovery with other Linux systems, probably with similar steps, with no significant difference.

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.