LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mandrake 9 : Forgotten Root Password (https://www.linuxquestions.org/questions/linux-general-1/mandrake-9-forgotten-root-password-38733/)

acadcworks 12-18-2002 04:08 AM

Mandrake 9 : Forgotten Root Password
 
I know I know :(

I have the Mandrake 9 CD here and have booted into rescue mode. But I am now lost! I have mounted my devices I believe and entered the command prompt..

There is a /etc/passwd file but no /etc/shadow or /etc/security

What should I do now?? Typeing passwd does not work it fails to set timeout or something.

born4linux 12-18-2002 05:30 AM

once chrooted in rescue mode, run this:

passwd

If you can pass parameter during normal boot up, why not boot into single mode? If you can do this, just run the passwd command.

acadcworks 12-18-2002 05:34 AM

i can boot into single user using

linux 1

HOWEVER, this asks for a root password for maintenance mode during the boot!!!! Else I have to press CTRL-D and this just takes me to the normal boot where I have to login!

Grrrr

acadcworks 12-18-2002 05:36 AM

Oh...and in rescue more

passwd

throws an error...

passwd: unable to set failure delay!!!!!

Very upset.

born4linux 12-18-2002 05:58 AM

well, something is messed up in your system (and it might not be just the password).

in rescue mode, before chrooting, e2fsck your partitions to check for erros. it goes something like this:

e2fsck -pyc /dev/hda6

-pyc - auto-repair (no questions), assume yes if there are any questions, check fo bad blocks.

after e2fscking your system, try to boot in single mode.

/etc/shadow will only be present if you have setup your system to use Shadow passwords, if not, u can just edit /etc/passwd and remove the entries between the first two colons (:) from the left side of the root entry. You won't be getting any password prompt for root if you do this.

acadcworks 12-18-2002 06:07 AM

e2fsck says it may caus severe damage so don't want to do that really.

the passwd entry looks like this;

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

but still i get the prompt

rootboy 12-18-2002 06:11 AM

This might help:

http://www.linuxworld.com/linuxworld...07-geek_2.html

Very nicely written article.

Here's the gist of it:

Quote:

At the LILO prompt, type the following:

init=/bin/sh rw

Your LILO prompt should look something like this:

LILO: {image name} init=/bin/sh rw



And from there runn passwd.


And when you replace your password, don't choose something easy that some cracker could guess, instead tell us what it is so we can remind you the next time you forget (after all, that is what friends are for...)


John

acadcworks 12-18-2002 06:31 AM

well, i got to a prompt but PASSWD was not available. I did what the article says

mount -a

I don't have /sbin/mount

but PASSWD still did not become available to me.

MasterC 12-18-2002 04:41 PM

Recently I installed Linux, and I believe I didn't forget my password but it instead "forgot" it somehow. Anyway, I went into the rescue mode (boot into regular install with CDROM, press F1 and type rescue) And simply removed the X in my root's /etc/passwd entry. Then when I booted back up I could login without a password, and immediately ran "passwd" to make a new password, which then worked.

HTH

Cool


All times are GMT -5. The time now is 10:17 PM.