3

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 ?

2 Answers 2

4

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.

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .