Reset root password when running a forced fsck and single user mode doesn't work
|
07-26-2011, 10:32 AM
(This post was last modified: 08-08-2011 12:12 PM by ScreechyNutz.)
Post: #1
|
|||
|
|||
Reset root password when running a forced fsck and single user mode doesn't work
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. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Reset root password when running a forced fsck and single user mode doesn't work - ScreechyNutz - 07-26-2011 10:32 AM
|
User(s) browsing this thread: 1 Guest(s)