[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Lost root passwd




On Sat, 10 Oct 1998, Michael Beattie wrote:

> > between the first and second double point ":".
> 
> Colon?
>  
> > Then reboot, your password is the empty password.
> 

ALlow me to translate.  Boot the rescue disk as if you are installing,
then the screen asking for you to select the color or monochrome display
appears, hit ctl-alt-F2 to get another VC. Hit return to get a prompt.
Mount your hard drive root partition on /mnt. Assuming your root partition
is the first partition on the first IDE drive, the command would be:

mount /dev/hda1 /mnt

then got into the etc directory by doing:

cd /mnt/etc

If the first line of /mnt/etc/passwd looks like this:

root:x:0:0:root:/root:/bin/bash

you will need to edit /mnt/etc/shadow

if the first like looks like this:

root:yRK5lD6lbqrE:0:0:root:/root:/bin/bash

(notice the garbled junk between the first two colons)
remove the garbage so it looks like this:

root::0:0:root:/root:/bin/bash

If it had an x between the first two, edit /mnt/etc/shadow doing the same
thing ... remove the garbage between the first two colons.

At this point, there will be no root password.

eject the floppy and type reboot at the prompt. Once the system reboots,
log inas root and reset the password using the passwd command.




Reply to: