On Oct 13 2007 08:03, Glenn Holmer wrote:
>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.  

... which is the way how it has been done ever since.
But you need /bin/bash otherwise you get, as pointed out, a sh-compat shell.

>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).

Actually, you use

        umount -a
        reboot -f

And I don't see why passwd would not work. Just make sure your root 
volume is actually read-write (which is the case when using an initrd 
created with suse), otherwise use

        mount / -o remount,rw


On Oct 13 2007 09:07, Glenn Holmer wrote:
>On Saturday 13 October 2007 08:48, Randall R Schulz wrote:
>> Technically, when invoked as /bin/sh, BASH operates in its Bourne
>> Shell compatibility mode, which deprives you of many of BASH's
>> innovations. Use /bin/bash to get full functionality.
>
>/bin/sh is a symlink to bash on 10.3

That does not matter. When called as sh, it operates in dumb mode.
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to