![]() |
Reset root password when running a forced fsck and single user mode doesn't work - Printable Version +- Linuxcat.org (https://www.linuxcat.org) +-- Forum: Linux Guides and Troubleshooting (/forumdisplay.php?fid=1) +--- Forum: Linux Troubleshooting (/forumdisplay.php?fid=3) +--- Thread: Reset root password when running a forced fsck and single user mode doesn't work (/showthread.php?tid=21) |
Reset root password when running a forced fsck and single user mode doesn't work - ScreechyNutz - 07-26-2011 10:32 AM When rebooting your linux system, you will sometimes face this screen: ![]() This can be a problem when you don't know what the root password is. The following steps will get around this issue and reset your root password. Step 1: Boot up your system and hit the enter when you are prompted on startup to enter the Grub loading screen. Step 2: Use the arrow keys to select your operating system and hit the 'e' key. Step 3: Use the arrow keys again to select the kernel and press 'e' e.g. "kernel /vmlinuz-2.6.27.5-117.fc10.i686 root=UUID=27f6ac23-638f-439a-8a97-2baaf6a32922 ro rhgb quiet" Step 4: Delete 'ro' from the line and amend 'init= /bin/bash' for CentOS and 'init= /bin/sh' for Debian Step 5: Hit 'Enter' to save and the press 'b' to boot Step 6: The system should now boot into a bash command line. Once in here you can mount the file system with: mount -o remount, rw / Step 7: Once you have mounted the file system, you can then change the root password with: passwd Step 8: Reboot the machine and once it is up to the fsck, you should be able to enter the new password and continue the fsck. |