Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-20-2009, 12:25 AM   #1
LQ Newbie
Registered: Sep 2008
Location: chandigarh
Posts: 1

Rep: Reputation: 0
Smile how to recover root passward in fedora core 8.0

pls send your views & help.
Old 03-20-2009, 12:39 AM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,418

Rep: Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398
You can't, it uses one-way encryption (assuming a decent passwd). Go into init level 1 or use the linux rescue mode from the CD and create a new passwd.
Old 03-20-2009, 12:53 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I stowed away the old laptop that I had Fedora 10 on. See if running in single mode (add an `s' to the end of the boot options) gets you in a shell as root without a password. If not, run the installer disk and select "rescue" or use a live distro.

The first problem is mounting the Logical Volumes. You want to access the root partition (/) to edit the /etc/shadow.
IIRC, you need to run mkblkdevs so that the device nodes of the logical volumes are created when booting up in a live distro or rescue mode. Please check the manpage on this.

lvscan can tell you which logical volumes are present. The default config AFAIK has a /boot partition and a single LVM2 physical partition.

Once the root partition is mounted, you can edit the /etc/shadow file. Deleting the characters between the first two colons :....: will zero out the root password. I did do this once after I somehow skipped the root password prompt when doing a fresh upgrade, and found that the system was configured so that you couldn't log in with null passwords. So instead, I copied the characters between the colons from my regular user password hash (/etc/shadow) and pasted these same characters in the root users entry. Then I was able to reboot and log in as root using my regular users password. Next I run the "passwd" command to set the root password right away.


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
how we can recover root password in fedora linux kamalkirat1 Linux - Software 3 11-21-2008 09:54 PM
Recover grub after winXP installation in Fedora Core 5 Buddhike G Linux - Software 3 08-29-2007 03:26 AM
root locking fedora core 6 jatender Linux - Software 8 07-31-2007 02:24 PM
Cannot install fedora core 1 or core 2: Initial setup crashes: "Unable to mount root" ovelasco Linux - Newbie 10 07-15-2004 08:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:52 PM.

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