LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Root user/password recovery/Fedora (http://www.linuxquestions.org/questions/linux-software-2/root-user-password-recovery-fedora-374124/)

killercrazyeyes 10-17-2005 10:59 PM

Root user/password recovery/Fedora
 
So I have never done this and do not know where to start. My buddy's It Guy took off on them and they do not have the root user password or any user password for that matter for a machine that is running Fedora. It's at the user login prompt Right now.This is a file server they use and need to get into it. Can anyone please help.

I dont know what version of Fedora it is right now. Maybe Fedora Core 3 or earlier.

Thanks in advance.

tkedwards 10-17-2005 11:07 PM

Boot off the fedora installation CD and go into rescue mode (type 'linux rescue' at the boot splash screen I think). It should mount the system's root partition somewhere under /mnt. So lets say its under /mnt/sysimage you would then
Code:

vi /mnt/sysimage/etc/shadow
and remove the password hash for the root entry like so:
Code:

root:AHFfsdfslj3$/.3$:13048:0:99999:7:::
root::13048:0:99999:7:::

(note that I've put junk values in for that entry - its not my real root password hash :))

You can do this with any LiveCD if you don't have your Fedora install CD.

spooon 10-17-2005 11:24 PM

You can append the "single" kernel option when you boot; that will put you into single-user mode (root access). Then "passwd" will change the password.

These links will help you:
* http://www.redhat.com/docs/manuals/e...ot-passwd.html
* http://linuxgazette.net/107/tomar.html

killercrazyeyes 10-17-2005 11:50 PM

tkedwards,

Would it be safe to say that I could do this with Knoppix. I have a version of knoppix right now on CD. Could I go ahead try this on my Kubuntu machine as a test? Thanks you so much for the fast reply you rule




:p

spooon 10-18-2005 12:01 AM

Quote:

Originally posted by killercrazyeyes
tkedwards,

Would it be safe to say that I could do this with Knoppix.

Yes if you can boot Knoppix, you can mount your drive and edit the /etc/shadow file on there.

killercrazyeyes 10-19-2005 01:14 AM

Spoon,

How would I do this with Knoppix. Can you please explain a little more. what would the command to be to mount the drive once knoppix is running. What do I do to edit the /etc/shadow file

thanks

:)

tkedwards 10-19-2005 02:00 AM

Once you've booted it knoppix will create mount points and fstab entries for all your partitions that it detects. So you should only have to right-click on the icon on the KDE desktop for whatever drive it is and select 'mount'. Or as root at a command line do:
Code:

mount /mnt/hda3
(replace hda3 with whatever your drive is). Once you've mounted it you can browse to the /mnt/hda3/etc/ folder and double-click on shadow. It should open in kwrite or something like that and you can then edit it like I described in my earlier post.


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