Forgotten Root Password
Having a nightmare time cos I have forgotten the root password :(
Have tried everything I think
1) Entered rescue mode and used passwd. This fails with passwd: unable to set failure delay
2) Tried to enter single mode linux from LILO. However, just after it enters INIT Single Mode it prompts for ROOT password. How useful!
3) Have tried to boot with init=/bin/sh. This gets me to a minimal prompt. I can see a few /etc/passwd files like passwd, passwd.OLD, passwd.bak but I have no commands at my disposal. Do I need to remove the x character from the passwd line root:x: ?? And how on earth to I get this vim editor going! It keeps telling me I have no permissions to save the file.
This is my worst nightmare, hope you can help.
Use the last option with init=/bin/sh. This is no minimal prompt, but acutally you normal shell. The thing is that no environment variables are set, including PATH, and that no other processes are running. Try running /usr/bin/passwd instead of just passwd and you'll be fine.
And finally, don't use vi, use emacs!
Oh yes, I forgot. Don't edit the password in /etc/passwd. x specifies that the password is to be found in the /etc/shadow file. The reason for shadow passwords is that /etc/shadow is readable by root only, so that noone can grab your encrypted password and decrypt (this could only be done in a supercomputer, I think, but it's good protection nonetheless).
Dolda: you forgot one thing. They have to remount the / directory read/write with `mount -o remount,rw /` to get things to be able to be edited. The password for root is actually in /etc/shadow but you don't want to actually edit the file. You want to use the command `passwd root` to change the root password. Oh, and another thing, vi and emacs are both too powerful for a newer person to use, they don't need to know about "buffers" and "modes" which are present in both of these editors, all they want to do is edit the file, then save it. I would say pico/nano would be better (as that is what I learned on). I like Vi for personal use now though:)
I can't believe it! Every time I've suggested something with init=/bin/sh I've always forgot about remounting /!
Anyway, you're probably right about the emacs/vi thing, but I'm just too eager to recruit new emacs users... =) Anyway, I think pico/nano are just a little _too_ simple, too hard to use, and honestly, bad looking. Isn't there some look-alike for the MS-DOS edit command available? That'd probably be the best. MS has actually made some half good stuff (although it was before windows...)
I don't think MS made the dos "edit" program, I think that was inherited when they stole dos. Not positive though.