On Sat, 2007-10-13 at 16:26 +0200, Jan Engelhardt wrote:
> 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.

I have used Unix/Linux for a couple decades and have not yet had a root
password issue. But I know there is always tomorrow. I will be keeping
this e-mail. Perhaps this is also on the wiki? It is surely good info.
If also a bit of a security issue.

-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to