LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-11-2003, 03:55 AM   #1
juno
Member
 
Registered: Sep 2002
Location: fdas
Posts: 100

Rep: Reputation: 15
forgot root password


I use RH 9 , if forgot the root password , how to get back the password ? t hx.
 
Old 05-11-2003, 04:16 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
at the lilo prompt, boot single user.
run passwd
 
Old 05-11-2003, 07:26 AM   #3
juno
Member
 
Registered: Sep 2002
Location: fdas
Posts: 100

Original Poster
Rep: Reputation: 15
How to boot to single user mode ? thx.
 
Old 05-11-2003, 07:29 AM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
I assme RedHat is using GRUB since a while. Check http://www.redhat.com/docs/manuals/l...ng-single.html since it answers your question.
 
Old 05-11-2003, 07:31 AM   #5
nuzzy
Member
 
Registered: Aug 2001
Location: New Hampshire, USA
Distribution: Ubuntu 6.06 LTS
Posts: 204

Rep: Reputation: 31
reboot -s at a command prompt should do it too...
 
Old 05-11-2003, 07:33 AM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
I bet that person is dual booting and lost the password, thus no other chance than that!
 
Old 05-11-2003, 07:59 AM   #7
juno
Member
 
Registered: Sep 2002
Location: fdas
Posts: 100

Original Poster
Rep: Reputation: 15
hi markus ,

I read the doc, the first step is type p and type in the password , but i forgot the password , so i can't pass through this step , what can i do? thx.
 
Old 05-11-2003, 08:05 AM   #8
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Hmm, well you can always use Knoppix and when the Knoppix prompt appears enter knoppix 2 ... then mount your root partition and edit /etc/shadow. It will look like this (the first line
Quote:
root:$1$eNq5hBUx$lTkmKii66qdLZwHz4QKBA/:12176:0:99999:7:::
So in this case to reset the password (no password set) remove the 2nd part (starts at first :) $1eNq5hBUx$lTkmKii66qdLZwHz4QKBA/ until the 3rd part starts (next :). So it will look like this:
Quote:
root::12176:0:99999:7:::
Now root has NO PASSWORD. If you have network connection I advise you to unplug it otherwise you have a real security problem ... after that jsut reboot and login as root and set a new password!

Last edited by markus1982; 05-11-2003 at 08:06 AM.
 
  


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
Forgot root password muru Linux - Security 5 09-26-2005 12:37 AM
forgot root password ali_hammad Linux - Newbie 3 03-09-2005 10:46 AM
forgot root password ali_hammad Linux - Security 4 03-08-2005 02:44 PM
Forgot root password Jay Smith Linux - Newbie 15 10-12-2004 06:23 PM
Forgot Root Password Ironpaws Linux - Software 6 07-03-2004 04:48 PM


All times are GMT -5. The time now is 06:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration