Today, there is a Red Hat server installation time too long, and the installer forgot the root password, only remember their username password (chenfeng/123), do?
Later, the data were finally resolved.
After the boot appears the System selection interface, in red Hat Linux option on the "E" key, or some single system machine is not the system to select the interface, it does not matter, skip the BIOS also non-stop press "E" key,
Next, there are three options, press "E" on "kernel/boot/vmlinuz-2.4.18-14 ro root=label=/" to edit,
Before "Ro" or "root" plus "single", and then enter return.
Press "B" key to start, enter the character interface, when "sh-2.05b#", means has entered Single-user mode, and notice you will find that Single-user mode is logged with root,
All right, now you're free to change your password.
Two ways:
1, directly modify the root password, input passwd root, repeat input two times you can reset the root password.
2, will you remember the normal user name to enhance the rights
Vim/etc/sudoers, open the file editor and add a line below the line root all= (All)
Chenfeng all= (All),!wq force save.
So even if you don't know the root password, the next time you log in with Chenfeng, you can use the Sudo-s command to enter your own password to elevate the normal permissions to root super Admin privileges.