LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2002, 04:08 AM   #1
acadcworks
LQ Newbie
 
Registered: Oct 2002
Posts: 21

Rep: Reputation: 15
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.
 
Old 12-18-2002, 05:30 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
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.
 
Old 12-18-2002, 05:34 AM   #3
acadcworks
LQ Newbie
 
Registered: Oct 2002
Posts: 21

Original Poster
Rep: Reputation: 15
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
 
Old 12-18-2002, 05:36 AM   #4
acadcworks
LQ Newbie
 
Registered: Oct 2002
Posts: 21

Original Poster
Rep: Reputation: 15
Oh...and in rescue more

passwd

throws an error...

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

Very upset.
 
Old 12-18-2002, 05:58 AM   #5
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
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.
 
Old 12-18-2002, 06:07 AM   #6
acadcworks
LQ Newbie
 
Registered: Oct 2002
Posts: 21

Original Poster
Rep: Reputation: 15
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
 
Old 12-18-2002, 06:11 AM   #7
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
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
 
Old 12-18-2002, 06:31 AM   #8
acadcworks
LQ Newbie
 
Registered: Oct 2002
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
Old 12-18-2002, 04:41 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
if the root password is forgotten..... AnimaSola Linux - Software 1 05-31-2005 11:12 PM
How to reset forgotten root password comprookie2000 Linux - Newbie 4 10-28-2004 01:33 PM
forgotten my root password, help amanjsingh Linux - Newbie 16 03-31-2004 10:41 PM
Forgotten my root password Blondie Linux - Newbie 2 12-08-2003 12:50 PM
Root Password FORGOTTEN kajensen Linux - Newbie 4 08-11-2003 03:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration