Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I reset the root password in fedora ? Is there any way out ? I have googled a lot but couldn't find any useful result.

share|improve this question
Do you just want to reset the password or do you not have it to begin with? – MaQleod Aug 1 '12 at 6:24
@MaQleod reset the password – Suhail Gupta Aug 1 '12 at 6:27
up vote 8 down vote accepted

the Fedora documentation gives Information on how to reset the root password.

You can also use this more general approach here with init=/bin/bash which works on about any distro.

This is from the Ubuntu documentation:

  1. Reboot your computer

  2. Press SHIFT or ESC at the grub prompt (as earlier).

  3. Select your image.

  4. Highlight the line that begins kernel and press 'e' to edit

  5. Go to the very end of the line, change the ro to rw and add init=/bin/bash

press enter, then press b to boot your system.

Your system will boot up to a passwordless root shell.

  1. Type in passwd username

  2. Set your password.

  3. Type in reboot

This should work,too

share|improve this answer

With sudo access:

When you at least have sudo access to the machine you can use sudo bash to aquire a root shell and passwd afterwards.

With chroot:

Another way would be to boot from a LiveCD (or USB Stick with a live System). Then you have to mount your system partitions. At least the ones containing /etc and the location of passwd, probably /bin check with which passwd. Afterwards you chroot into that directory.

 mount /dev/sda1 /mnt/system
 mount /dev/sda2 /mnt/system/etc
 chroot /mnt/system /bin/bash

Now you are virtually inside your new environment and can use passwd. Maybe you have to update your environment with hash -r before.

share|improve this answer

This works in debian distros, should work in Fedora I think (assuming you have sudo privs)

sudo passwd root

type and verify the new password and done.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .