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

Re: lost password



On Tue, Jun 29, 2004 at 10:05:40PM +0300, Todor Tzankov wrote:
> Boot from the CD as normaly,
> change to the second console,
> 
> mount the root partition:
> #mkdir temp
> #mount /dev/hda1 temp
> 
> chroot in that directory:
> #chroot temp /bin/bash
> 
> and change root password:
> #passwd
> 
> Hope that helps ;)
> 
> ?? 29 06 2004 21:35 disciple@exis.net ??????:
> > forgot root password.  just installed "woody"...
> > tried alt, shift ctrl keys and was able to get to lilo.  it still asked
> > for the root passwd.  booted to cd and ran:
> >
> > rescue root=/dev/hda1  still could not change anything...
> >
> > how do i reset?
> 

On the lilo prompt press tab, then write
linux init=/bin/sh
(replace linux with your kernel name if necessary). when the system
comes up use vi to open /etc/shadow and /etc/shadow- if you have them
or /etc/passwd, and delete the second field between the ':' with all
the junk in it in both files
root:$1$2sHrhbJj$wlsdD6uVQiEaYRRE0AOHI.:12509:0:99999:7:::
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Now write su, it won't ask for a password as there is none, you can now
do passwd to change password. You may need to force vim to write the
file since its read only probably. You may also need to remount the
file system read/write for this
mount -t <fs type> /dev/hd<partition> / -o remount,rw
> 
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: