The grub settings are described 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
Enable the computer. On the gurb Boot Loader menu, select Fedora and type [e] to enter the editing mode.
A list of pilot projects is displayed. Find the following output sentence lines:
Kernel/vmlinuz-2.6.23.1-42.fc8 ro root =/dev/VolGroup00/LogVol00 rhgb quiet
Press the arrow keys until the line is highlighted and then press [e]. Now you can add a single entry at the end of the text to tell grub to guide the Linux mode for a single user.
Press the [Enter] key to make the editing result take effect. You will be taken with the edit mode screen. From here, press B and grub will guide the single-user Linux mode.
After loading, you will face a shell prompt similar to the following: sh-3.2 #
The single-user mode is equivalent to the Windows security mode. Only the root user has "#"!
Sh-3.2 # vi/etc/passwd
Only the first line in passwd is mentioned here.
Root: x: 0: 0: root:/bin/bash
Here, "x" indicates that the root password is removed from "x" and changed
Root: 0: 0: root:/bin/bash
Sh-3.2 # vi/etc/shadow
Similarly, modify the first line in shadow.
Root: $1 $ 3YjH4woI $ 49jmwaejd9roj1_g3yo7j.: 13928: 0: 99999: 7 :::
Remove the root password and change it
Root: 13928: 0: 99999: 7 :::
When you exit, you must use wq!
In this way, the root user has no password. Starting from the computer, it broke through the root user.