Linux hack root password

Source: Internet
Author: User

Reference from http://www.cnblogs.com/zero527/p/6904966.html

1. Single-user mode

The first step:
Grub boot screen reads seconds by pressing the UP and DOWN ARROW keys to enter the Grub interface

Step Two:

Use the up and down cursor keys to select the operating system boot kernel you want to modify (by default), press the E key to edit

Step Three:

Use the up and down cursor keys to select "linux16 ..." line, delete rhgb quiet, press end to move to end of line, add parameter init=/bin/sh at the end to tell Grub to pass parameters to the operating system when starting this operating system. Press CTRL + X to reboot.

Fourth Step:

Normal access to the following interface

Enter the following command to reset the user password

If the system has SELinux enabled, you need to run the Touch/.autorelabel command, or the system may not boot properly

Run the command exec/sbin/init to start normally, or restart with the command exec/sbin/reboot.

The restart process is slow because the system is re-refreshing the SELinux security label.

2. Rescue mode

The first step:
Configure BIOS boot entry, use disc for first boot, press F10 to save exit

Step Two:

Read the second process select troubleshooting Enter

Then select Rescue a CentOS system to enter rescue mode

Step Three:

Read the tips and select continue to continue

Fourth Step:

Remember the chroot/mnt/sysimage command, then always click OK to continue

Fifth Step:

Enter the CD system, enter the Chroot/mnt/sysimage command to mount the local hard disk's operating system, change the password

Then exit the hard disk operating system, reboot reboot the system, and enter the BIOS set the hard disk as the first boot entry, into the hard disk system can

Linux hack root password

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.