LinuxQuestions.org
Visit Jeremy's Blog.
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 04-01-2002, 01:35 AM   #1
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
Please Help


Hello

I have got myself into a big fix. I forgot my root password and add to that i set the timeout in the lilo.conf to 0. So the lilo loader does not come up at all, it directly boots into linux.

how do i recover the root password now?

thanks in advance

regards
jayakrishnan

Last edited by jayakrishnan; 04-01-2002 at 01:38 AM.
 
Old 04-01-2002, 01:41 AM   #2
ericn
Member
 
Registered: Oct 2001
Distribution: Mandrake 8.2
Posts: 44

Rep: Reputation: 15
I see that you use RedHat, if this is so you can boot up with the install cd and use the rescue option in the menu. After your system is mounted under what I believe is /mnt/sysimage, you can cd into that directory like
cd /mnt/sysimage
then run
passwd root (you may not need the root)
then change your password.

Then your good to go.

later
eric
 
Old 04-01-2002, 01:45 AM   #3
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
Thanks for the reply

hi

Thanks for the reply. But i already tried to do that. but i got lost inside the sysimage directory . Is there any simple way to change the root password.

regards
jayakrishnan
 
Old 04-01-2002, 02:16 AM   #4
ericn
Member
 
Registered: Oct 2001
Distribution: Mandrake 8.2
Posts: 44

Rep: Reputation: 15
That is the simple way. Other than not forgetting roots password.
Just do
cd /mnt/sysimage
or to make sure where you are at each step
cd /mnt
ls (this should list sysimage)
cd /sysimage
ls (this should list your linux partition and all the folders, ie /sbin .etc

then try
/sbin/passwd

that is the only way i know how to gain root access again, short of remembering it.

late
eric
 
Old 04-01-2002, 02:29 AM   #5
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
hello

Thanks for the eariler reply. i tried to find the /etc/passwd file. but coudn't find it. even lilo.conf file is missing.
 
Old 04-01-2002, 04:30 AM   #6
nikhiljosh
Member
 
Registered: Jun 2001
Posts: 126

Rep: Reputation: 16
Generally I do the following if I'm in trouble

boot from red hat cdrom
type linux rescue

In rescue mode
$mkdir help
$mount /dev/hdaX help

Here instead of X put appropriate no. which represents ur root

$chroot help

and try to solve my prob

HTH

Last edited by nikhiljosh; 04-01-2002 at 04:34 AM.
 
Old 04-01-2002, 04:32 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
do you not have a boot disk to load from? if you have theat then you hsould load into your system using "linux single" or "linux init 1" and run passwd there. as for the rescue mode, run "mount" to see where the partitions are actaully mounted, and change to the correct diroectory accordingly, and change them there. as you say lilo.conf or passwd are missing, then it suggest you'r not looking in the right place at all. it'll be /mnt/sysimage/etc/ or something. you'll need to hack around a bit withthe lilo.conf file in order to reinstall it, as all teh paths will be different and so forth.

and can i ask you use more useful thread titles in futures, thanks
 
  


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



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

All times are GMT -5. The time now is 01:56 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
Open Source Consulting | Domain Registration