Click to See Complete Forum and Search --> : cardinal sin
bluebell
06-19-2001, 08:44 AM
i have made my most spectacular mistake so far...
....lost my root password
*cringes*
i won't bother going into how, suffice to say that i picked a string of digits and must have got them mixed up both times. :(
i know, i know... it was late, is that a good enough excuse?
please tell me i'm not completely screwed, i've reinstalled so many times lately i can hardly focus my eyes :((
:::thankyou:::
Marcel2008
06-19-2001, 08:50 AM
Unless you want to go into hacking linux, you better reinstall (sorry).
Maybe you should do an very easy root password? Like 1234?
Have fun reinstalling! :D
demian
06-19-2001, 09:04 AM
There's absolutly no need to reinstall!!
Go and get toms's rtbt (http://www.toms.net/rb/) (that's linux on a floppy), boot with that disk and mount your root partition:
mount /dev/hda1 /mnt (eg)
Edit the file /mnt/etc/passwd (/mnt/etc/shadow if you use shadow passwords) and blank the password field for root. For the /etc/shadow file this would look like this for instance:
root::11255:0:99999:7:::
or in /etc/passwd:
root::0:0:root:/root:/bin/bash
Mind you that you modify either /mnt/etc/shadow or /mnt/etc/passwd not both. If /mnt/etc/shadow exists use that.
Save the file, boot back to your normal linux and you can log in to root's account without a password. You should set a new one at some point in time ;)
Keyser Soze
06-19-2001, 11:23 AM
I hate to play the simpleton, but did you try linux single at boot up? :rolleyes:
klamath
06-19-2001, 11:25 AM
Keyser Soze: Most Linux distros ask for the root password when entering single user mode.
Keyser Soze
06-19-2001, 02:49 PM
That's odd, I have always gone that route to assign a new password unless I have edited it for a password request... :confused: Due to the fact that I usually assign a 15 character password...Oh well, maybe I am remembering it wrong..
[ 19 June 2001: Message edited by: Keyser Soze ]
Xsecrets
06-19-2001, 03:45 PM
And let's hope you didn't use md5 paswords.
klamath
06-19-2001, 04:01 PM
And let's hope you didn't use md5 paswords.
Why? Just decide on a new password (say, 'foo'). Then get the MD5 digest of 'foo', and put that in the passwd file. Then reboot, and enter your password as 'foo'. The system should compute MD5 'foo' and compare it with the stored digest -- and they should be the same, so you'll be golden. Right...?