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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-18-2002, 03:08 AM
|
#1
|
LQ Newbie
Registered: Oct 2002
Posts: 21
Rep:
|
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.
|
|
|
12-18-2002, 04:30 AM
|
#2
|
Senior Member
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127
Rep:
|
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.
|
|
|
12-18-2002, 04:34 AM
|
#3
|
LQ Newbie
Registered: Oct 2002
Posts: 21
Original Poster
Rep:
|
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
|
|
|
12-18-2002, 04:36 AM
|
#4
|
LQ Newbie
Registered: Oct 2002
Posts: 21
Original Poster
Rep:
|
Oh...and in rescue more
passwd
throws an error...
passwd: unable to set failure delay!!!!!
Very upset.
|
|
|
12-18-2002, 04:58 AM
|
#5
|
Senior Member
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127
Rep:
|
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.
|
|
|
12-18-2002, 05:07 AM
|
#6
|
LQ Newbie
Registered: Oct 2002
Posts: 21
Original Poster
Rep:
|
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
|
|
|
12-18-2002, 05:11 AM
|
#7
|
Member
Registered: Oct 2001
Distribution: Mint 15
Posts: 770
Rep:
|
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
|
|
|
12-18-2002, 05:31 AM
|
#8
|
LQ Newbie
Registered: Oct 2002
Posts: 21
Original Poster
Rep:
|
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.
|
|
|
12-18-2002, 03:41 PM
|
#9
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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 04:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|