Dry Share-linux (redhat/centos) root password three ways to get back

Source: Internet
Author: User

One, the first way

1, boot.

2. Insert the disc.

3, enter the BIOS mode, adjust the disc as the first startup item, save and restart.

4, select the third item "Rescue Installed System", click Enter.

5. Select the language and keyboard.

6, whether to start the network, choose not to start.

7, click Continue.

8, click OK.

9. Click OK (approximate meaning: Your system is already mounted to the/mnt/sysimage directory)

10. Select the first line, enter the shell, and click OK.

11. Check if root exists.

12, edit the configuration file, delete the first line of x (the cursor moves to the bottom of the X, click on the keyboard delete can be deleted), save and exit.

vi/mnt/sysimage/etc/passwd

Tip: It's a good idea to check the file again if the request is correct.

13, input halt shutdown, when prompted "system halted" and wait about a minute or so, you can manually press the button to shut down the machine.

14. Boot into the BIOS again, adjust the drive to boot and save the reboot.

15, once again enter the system, enter the user name root, you will find directly into the back as long as you through the passwd reset password can be.

Ii. Second Way

1, boot.

2. When the following interface appears, press ENTER--

The following interface appears.

3, press "E" key, select the second item.

4, press "E" key.

5. Enter/init 1 into single-user mode (to check if this command is saved).

6. Press the B key on the keyboard to restart.

7, restart after the single-user mode, repeat the first method of 第11-12 step, save and restart.

8. Repeat the 15th step of the first method after restarting again.

Iii. Third method

1, repeat the first method of 第1-10 step.

2. Do the following

3, manual shutdown, adjust the boot sequence after saving and restart.

4. Enter the password you just created to enter root.

Welcome attention
Sina Weibo: https://weibo.com/yougazhang0506
Public platform: Zhang Yujia

My site: http://www.zhangyujia.cn
51CTO Blog: http://blog.51cto.com/11099293
CSDN Blog: http://blog.csdn.net/u013260195
github:https://github.com/zhangyujia0506/


Dry Share-linux (redhat/centos) root password three ways to get back

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.