The other way to do it is to not touch the shadow file.
*remove the computer from the network while doing this*
mount up the partition and add in a user to your /etc/password file
with a UID of 0 and a GID of 0 (I usually use Tux)
Then save the file and reboot.
When you are asked for the user put in the one you just created (eg
Tux)
that should let you in without a password, then since you are root you
should be able to change the root password to something you know.
Just make sure you remove the temporary user (Tux) otherwise you will
cause all sorts of security issues.
*add the computer back to the network*
Later and happy hacking
Dany Allard
bogi wrote:
Ok.
So you locked it up :-)
check a system, where you have a known password, copy the /etc/shadow
file, it
should contain a line for root user's password, encripted :-) put it
on a
floppy ..
Get a boot-cd (from the distro, or redhat or fedora or etc...) and
reboot the
puter with it.
mount the now diabled system somewhare, the boot-disk rescue option
should
have an option to do so. If not, just choose a terminal option, and
mount it
somewhare.
edit the systems /etc/shadow file by pasting the (known but encripted)
password over the existing one. save, the reboot.
Hopefully now the system has the same password you had in the other
system.
The JohnTheRipper option, against a good password could take years :-)
Cheers
Szemir
On May 4, 2004 05:17, Dave Bourassa wrote:
> Curtis Sloan wrote:
> > Why do I always forget single-user mode? This is the way to go.
> >
> > Thanks, Szemir.
> >
> > Curtis
> >
> > On Mon May 3 2004 18:51, bogi wrote:
> >>Need to restart the system in single mode. With Lilo, it is a -s
switch,
> >>with grub you add single to the boot-params of the kernel. This
should
> >> drop you onto a root-shell, change the root password: passwd root
> >>Type in what you want :-) Just remember it :-) , then CTRL+d to
exit the
> >>root-shell. The system should reboot then, restart it normally.
done.
> >>
> >>Cheers
> >>Szemir
> >>
> >>On May 3, 2004 18:30, Dave Bourassa wrote:
> >>>Okay I confess. I seem to have forgotten the root pw for my
wife's SuSE
> >>>9.0 box. I have the user id and pw, but I can't for the life of
me
> >>>remember the root pw. What's the easiest way to recover from
this
> >>>calamity? All I wanted to do was reset the clock for daylight
saving
> >>>time and it wants root access to do it. Of course I should have
it for
> >>>other stuff anyway, so any help will be appreciated. Thanx a
bunch.
>
> Thanx for the help, guys. I've tried the single user mode, though,
and
> it comes up and asks me for the pw before I can get into it. Is it
> something new with SuSE 9.0 and grub, to increase security? I'll
check
> into the links provided after work today, unless you have any more
ideas
> on the single user mode trick.
>
> Thanx again.