How to break through root users through Grub under Linux system
This article is about how to break through root users through Grub in Linux system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Let's start with the settings of grub, as follows
Default=1 timeout=10 splashimage= (hd0,2) / grub/splash.xpm.gz hiddenmenu title Fedora root (hd0,2) kernel / vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd / initrd-2.6.23.1-42.fc8.img title Windows rootnoverify (hd0,0) chainloader + 1
Turn on the computer, on the gurb bootloader menu, select the Fedora entry, and type [e] to enter edit mode.
Meet with a list of pilot projects. Look for sentence lines similar to the following output:
Kernel / vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
Press the arrow key until the line is highlighted, and then press [e]. You can now add single to the space at the end of the text to tell grub to boot single-user Linux mode.
Press the [Enter] key to make the editing results effective. You will be taken to edit the mode screen, from here, press b, grub will boot single-user Linux mode.
After finishing loading, you will be faced with a shell prompt similar to the following: sh-3.2#
Single-user mode, equivalent to the security mode under Windows, only root has "#"!
Sh-3.2# vi / etc/passwd
Only the first line in passwd is mentioned here
Root:x:0:0:root:/root:/bin/bash
The "x" here means that there is a password in root. Remove the "x" and change it to
Root::0:0:root:/root:/bin/bash
Sh-3.2# vi / etc/shadow
By the same token, modify the first line in shadow
Root:$1 $3YjH4woIcoat 49jmwAEjd9RoJG0g3YO7J.VO13928VO0VO0R099999VO7:
Remove the root password and change it to
Root::13928:0:99999:7:::
Be sure to forcibly save it when you exit here: wq!
In this way, the root user does not have a password. From the boot computer, the Linux system through Grub breakthrough root users.
Thank you for reading! This is the end of the article on "how to break through root users through Grub under the Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!