Forget Root password !!


Forget Root password !!

Help me.. please

we have a RedHat 7.0 box.
but nobody knows root password.~
we have no OS CD box.
Urgent problem.
Any tips are available. Help
we are wating for your help
Sยภเl Kย๓คг
Respected Contributor

Re: Forget Root password !!

Dear Jack
Try this
Boot the machine in to singleuser mode.If you are lucky u will directly get the # prompt.Once after getting the # use the passwd command to change the root user password.
Enter the password:
Reenter Password:

If you are able to do this ...good

All the best

Your imagination is the preview of your life's coming attractions
Slawomir Gora
Honored Contributor

Re: Forget Root password !!


you can download floppy boot disc from redhat web or slackware.

boot from floppy boot disk

mount you RedHat partition to /mnt

edit /mnt/etc/shadow end erase second field (hashed pass)

umount and reboot

Josef Forman
Frequent Advisor

Re: Forget Root password !!

try at boot time like a param for kernel write "init=/bin/sh"
then on prompt line write "mount -n -o remount,rw /"
and now you can use passwd to change root password.

Steven E. Protter
Exalted Contributor

Re: Forget Root password !!

There is no way to bypass or decrypt the pasword on a RH 7 box. The console prompt will require a password.

You may get lucky about 50% of the time if the admin used a simple password, the crack utility may be able to give you the password.


cd /root
cp /etc/shadow .

run crack against shadow and see if it gives you root.

Then implement password list procedures that are safe.

If crack can't do it you are pretty much done. Get an upgrade cd and use regular uers to get data off the box prior to starting. Any upgrade higher than RH 8.x is destructive.

You can always download and create a RH 7 boot cd. I don't know if that gains you anything.

Steven E Protter
Owner of ISN Corporation
Alexander Chuzhoy
Honored Contributor

Re: Forget Root password !!

I'd reset the password.
from the lilo boot-press ctrl+x
then specify to boot to init 1.
This init logs you in as root without prompting for username/password.
From command line issue the passwd command
and reset the password for root.
Olivier Drouin
Trusted Contributor

Re: Forget Root password !!

I normally use Josef Forman's method.
Not that it happens often tough ;-).
Chris Saunderson
Frequent Advisor

Re: Forget Root password !!

Download a rescue disk, create rescue disk, boot from rescue disk, edit /etc/shadow to remove the password, reboot, login, change password!.
Ted Nugent called. He wants his shirt back.
Francesco Sarno
Frequent Advisor

Re: Forget Root password !!

I think li chris.It is the simpler solution
Jan Sladky
Trusted Contributor

Re: Forget Root password !!

You have still a chance !

before boot type this kernel parameter: init=/bin/bash

You'll get bash console
mount -n -o remount,rw /
type new passwd !

br Jan

GSM, Intelligent Networks, UNIX