How to reset forgotten root password
You can reset the root password in case you have forgotten it. For this we use boot options in grub. We will boot in runlevel 1 for this purpose. Runlevel 1 is Single User mode.
Here is an excellent guide if you do not know anything about runlevels by bobjensen
Requirements
This assumes that you are running a standard fedora installation with grub. Although this guide is written keeping fedora 8 in mind, this should also work with other releases.
Doing the work
- Restart your computer.
- When the grub options appear (the menu that lets you select multiple kernels, in case you have multiple kernels) press Escape key.
- When you press the Escape key you will reach in the kernel selection menu.
- Select the appropriate kernel you want to boot in and press 'a' (without quotes). You will have a prompt now. The prompt will be something like this.
grub append> ro root=LABEL=/ rhgb quiet
- Add '1' to that line. So the whole prompt line would look something like
grub append> ro root=LABEL=/ rhgb quiet 1
- Now let the computer boot. Once booted up, you will get a prompt like
sh-3.2#
- Enter passwd here. passwd is the command used to change the password for a user.
# passwd
- The system will ask you for your new password, enter it twice and you are done.
- Reboot your machine and let it boot normally.
More Information
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

