On Friday 12 October 2007 11:16, Jonathan Arnold wrote:
> Recovering from a broken root password isn't really that hard. The
> thing to do in the past is to boot into single user mode, but many
> distros, openSUSE included, now ask for the root password even in
> that case.
>
> Nowadays, you have to boot some Live CD, mount the partition
> containing the /etc directory of the OS in question, and edit the
> /etc/shadow file to remove root's password from the password field.

You can just enter "init=/bin/sh" on the Boot Options line of the GRUB 
boot screen.  The system will boot straight into bash and you can use 
your favorite editor on /etc/shadow.  

Do NOT use the passwd command at this point, you will have 
0-length /etc/passwd and/or /etc/shadow files after you reboot... I'll 
leave it to somebody smarter than me to explain why since I plain don't 
know :)  

After removing the password, use ctrl-alt-delete to restart the machine 
(if you use "exit" or control-D, you get a kernel panic / hard wait).

-- 
"After the vintage season came the aftermath - and Cenbe."
Glenn Holmer  (Q-Link: ShadowM)  http://www.lyonlabs.org
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to