Operating System - Linux
1752567 Members
5052 Online
108788 Solutions
New Discussion юеВ

Re: Forget Root password !!

 
jackfiled
Advisor

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
9 REPLIES 9

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.
#passwd
Enter the password:
Reenter Password:

If you are able to do this ...good


All the best

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

Re: Forget Root password !!

Hi,

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

ftp://sunsite.icm.edu.pl/pub/Linux/slackware/slackware-9.1/bootdisks/bare.i
ftp://sunsite.icm.edu.pl/pub/Linux/slackware/slackware-9.1/rootdisks/rescue.dsk

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 !!

Hi,
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.

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

So:

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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
F.
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
then
mount -n -o remount,rw /
then
passwd
type new passwd !

br Jan




GSM, Intelligent Networks, UNIX