-   Linux - Software (
-   -   Root user/password recovery/Fedora (

killercrazyeyes 10-17-2005 11: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-18-2005 12:07 AM

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

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


(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-18-2005 12:24 AM

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:

killercrazyeyes 10-18-2005 12:50 AM


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


spooon 10-18-2005 01:01 AM


Originally posted by killercrazyeyes

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 02:14 AM


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



tkedwards 10-19-2005 03: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:

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 11:55 AM.