LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 06-01-2004, 04:38 AM   #1
Hamid Moradmand
LQ Newbie
 
Registered: May 2004
Location: Iran
Distribution: Redhat
Posts: 7

Rep: Reputation: 0
Question I Forgot my root password


Hi there!

I forgot my root password and I don't have any password else.
What should I do for entering?

Thanks for your help!!!

Last edited by Hamid Moradmand; 06-01-2004 at 04:42 AM.
 
Old 06-01-2004, 05:08 AM   #2
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
I think you're gonna have to format, (but you don't have to lose important data, see below) if there is only one user on your machine (which there shouldn't be really, you should have at least one "normal" user aside from root) there is very little you can do to get in.

The password to root will be stored in encrypted form so unless you've got a really easy password I wouldn't bother trying to brute force decrypt it. Apart from a remote machine root exploit, I doubt it is going to be easy to get in.

What you could do of course if you don't want to lose data is:

Boot of a Linux Live CD (There are plenty of them out there)
Mount your hard drive
Copy the data you need to CD-R, other harddrives or another computer

Then format the hard drive and reinstall, this time don't forget your root password and create a new user. If you have a really bad memory and your computer isn't a server, then you may as well write it down somewhere safe :)

Steve

Edit: lack of coffee, yes there are a few ways of doing it - followed below...

Last edited by SBing; 06-01-2004 at 06:52 AM.
 
Old 06-01-2004, 05:11 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Do a search for "linux-single" - if you haven't put measures in place to prevent it from being used (and you haven't already reformatted) that will tell you how to change the root password.
 
Old 06-01-2004, 06:31 AM   #4
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
no need to reformat, try

http://kitech.com.my/fedoraguide/#changerootpassword

it applies to red hat too
 
Old 06-02-2004, 01:45 PM   #5
smaida
Member
 
Registered: Apr 2004
Location: Richmond, VA - USA
Distribution: Debian
Posts: 62

Rep: Reputation: 15
If you are using redhat just boot from the redhat cd "disk 1" and choose recovery mode. You should be a ble to get to a linux shell at which point you want to locate your /etc/shadow or /etc/passwd file and find the line that looks like:
root:$2$6Fhe48fjFsSSkcms.e4SDjcDD:12546:0:99999:7:::

Change the line to look like root::12546:0:99999:7:::

You should then be able to login without a password.


Shawn
 
  


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 Off
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

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

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