Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

2 Answers 2

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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