I have a computer running linux which I do not have the root
password to. I am unable to get into single user mode from the LILO prompt on
this machine so I tried a different approach. I made a boot disk and recovery
disk on another machine which I installed a fresh installation of Red Hat Linux
5.2. I then booted the other machine with these floppies into recovery mode.
After mounting the hard drive as mount -t ext2 /dev/hda3 /mnt I viewed the
shadow file in the etc directory of the hard drive and found all the encrypted
passwords there. (The passwd file was not being used for the passwords). I
copied this file and then changed the permissions so I would be able to modify
the copy using vi when I rebooted the machine. I used cat on the copy just to
make sure it copied ok - which it did. I then rebooted the machine after
unmounting the hard drive and removed the floppies. I booted as normal and went
to find the copy of the shadow file but found there was no copy. I tried this
several times. It seems whatever changes I make to the hard drive disappear
after I boot the hard drive as normal. It seems to me the file is somehow being
copied to a ram disk or something and the copy is not being written to the hard
drive. What I wanted to do was modify the file using vi (which I can access when
I boot the pc normally but not from the bootdisk for some reason) and then use
the boot disk again to copy the modified file to shadow and then change the
permissions. This should re-set my root password if only I could copy files on
the mounted hard drive. Any ideas?
Edgar Petrone.
