Linux forgot to login password two ways to hack

Source: Internet
Author: User

  1. For Linux systems booting with GRUB. After post, when the Grub boot interface appears, press the E key to enter edit mode, as shown in:

  2. Move the cursor to the line with the word "kernel" and press the E key to edit it.

  3. Press a space at the end, enter the number 1, and press ENTER to return to the previous interface. The line means to load the kernel, the end of the parameter 1, the command is not recognized, so it will pass this parameter 1 to the system started the first process, and the system started the first process is Init,init 1 is to enter the single-user mode.

  4. Press the B key to start the system, after the boot is complete. Note that the prompt is the pound sign, which means that it is already root. Change the password directly with the command.

  5. Reboot the system, you can log in with the password you just changed.

  6. For Linux systems that are not booting with grub. You need tools to do it.

    Put the Linux system CD into the CD-ROM drive, then boot into the BIOS, set the boot system from the CD. :

  7. Select the third entry to enter rescue mode. Follow the prompts to step through the steps, such as:

  8. According to its prompt, the original system has been mounted in the/mnt/sysimage directory, only need to edit the/mnt/sysimage/etc/passwd file, the user of the second column of the x Delete, save, exit, remove the disc, restart the system. As shown in the following:

  9. After the restart is complete, note that enter the user name that you just removed the password, enter. will be able to enter the system.

Linux forgot to login password two ways to hack

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.