I am using RHEL 5.10.

I have mistakenly deleted /etc/passwd file in my server (though I have the backup).

I'm just trying to get into single user mode by typing single at the end of the kernel line at grup command prompt. After that hitting enter and b to boot the OS.

But once the boot completes it's not getting into the single user mode. it's getting into the usual default runlevel 3 and asking me the root password again.

What am I missing out ?


You want to boot with "init=/bin/sh" instead of "single" appended to the Grub kernel command line.

Once up, remount / at the command line with, mount -o remount,rw /

Then make your password changes and reboot.


Saw the same thing few days ago, don't know, what was the problem, but the following helped me

Once at grub boot menu, highlight the needed option, type "a", not "e", add single or init 1 at the end of the arguments

Should do the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.