On Fri, 2003-02-28 at 07:51, Jack Coates wrote: > you'll need to make or find a rescue disk that understands software RAID > -- look at tomsrtbt and LEAF/oxygen. Actually, I bet the Knoppix CD > would help. > > In theory one of the disks is primary and if you mount that disk > separately (via /dev/hda instead of /ded/md0, for instance) the changes > you make will propagate when the mirror is reformed. YMMV. > > Jack
All of the above are viable so I'll add one more. Pull the power from the second drive. The system now has only one drive.... this will make it easier to mount. (this might not need to be done... I did it and it worked for me and never tested the other way.) Boot from CD1 push f1 and have the rescue disk mount the drive. cd to /mnt/etc at the command prompt chroot /mnt/ vipw (you'll be editing the line that says root.) vipw is a special form of vi that only works with password files...much less hassle here. the chroot command makes sure you use and edit the real password file on your disk not the one in RAM. You'll see the first line and it looks like root:x:0:0:root:/root:/bin/bash change it to root::0:0:root:/root:/bin/bash Note: All I did was remove the x this means a passwordless root. It will now ask you if you want to edit shadow ... type y and hit return. You'll see the first line and it looks like. root:$1$LiESHE2R$bTsUJ/j3616T/opthAEmV1:12103:0:99999:7::: This is the "encrypted" version of your password everything between the first and second : (colon) is your password remove it so the line looks like. root::12103:0:99999:7::: Save and exit Now shutdown the box reconnect the second drive and when you boot you can log in as root without a password.. Then at the command line use passwd root and give it a new one.. James Your mileage may vary but this worked for me. > > On Fri, 2003-02-28 at 03:36, Nikos Papadopoulos wrote: > > I use Mandrake 8.2 and I have forgotten the root password or someone changed > > it. I tried to boot in single user mode, mount the disk and reset the > > password from the shadow and passwd files, but there are two HDD with > > software mirroring enabled and I could not mount the disk. What can I do in > > order to reset the root password? > > > > Regards, > > Nick. > > > > > > > > > > ______________________________________________________________________ > > > > Want to buy your Pack or Services from MandrakeSoft? > > Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
