Ask Your Question

Made dual-boot 14 with Win7_forgot Fed pw_how to overwrite/update/install new?

asked 2013-02-02 00:39:56 -0500

tpheenix gravatar image

updated 2015-12-29 12:06:33 -0500

mether gravatar image

newbielost-PWFed-14_how-to-access-drive-space A friend helped me install Fedora 14 as dual-boot with Win7Pro-64-bit. It has been idle for one year now and I can not find my password. How do I regain access to Fedora ? I have no file loss to worry about - work was saved to external drive. I did do a great deal of installing and add-ons. I suspect I must simply re-install a new Fedora over what is there, yes ? I need to either regain Fedora or remove it and have entire drive for Win7 to sell the machine.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2013-02-03 06:41:32 -0500

Pjotr gravatar image

updated 2013-02-03 06:49:20 -0500

The easiest solution to reset the root or any local user's password is:

  1. Boot to init level 1.

    • Find the entry in your boot selection screen that boots Fedora. If you have to press the enter-key multiple times, select the last entry before Fedora starts booting. If you see some countdown thing like '<entry> will be booted in <d> seconds...', press some arrow key (up/down), which will bring you to the correct boot selection screen.

    • Press 'e' to edit the entry and go to the line that starts with 'kernel /vmlinuz...'. Press 'e' again to edit the command, and append '1' (without the quotes) at the end (typically right after the 'rhgb quiet' options). Press enter to accept the changes.

    • Press 'b' to boot the modified entry. If successful, you will boot to 'single user mode', and obtain a prompt (black screen, white text, blinking cursor, you know) with root privileges.

  2. Change root/user password

    • To change the password for the root user, run the command: passwd. For a specific user, run passwd <username>. If you forgot the username,

      cat /etc/passwd | awk -F: '{if ($3 >= 500 && $7 != "/sbin/nologin") {print $1}}'

      will show you all valid user accounts. Note: replace '500' by '1000' for Fedora 16 or later.

    • Type new password (2 times)

    • Reboot via: reboot

edit flag offensive delete link more

answered 2013-02-02 05:10:50 -0500

erik gravatar image

updated 2013-02-02 19:25:44 -0500

If you just want to set a new password

  1. Start from a Fedora live system (from CD or USB stick).
  2. Mount the partition with your Fedora 14 installation. You can achieve this by movng the mouse to the top left and clicking on the left on the grey symbol with the two drawers. See this screenshot screenshot of fedora 18
  3. Then click on your Fedora 14 partition (probably named Fedora 14) and it will be mounted automagically.
  4. Open a terminal. Do this by typing term in the search field that you can see on the top right on the screenshot (it says Type to search). And press Return.
  5. Now, in the terminal, type

    su passwd

  6. You are now asked to enter a new password for root. Enter the password you like.

  7. Now you can copy your new password to your Fedora 14 installation. Do this by typing


    cd /var/media/Fedo*/etc/ # your Fedora 14 partition’s etc directory

    grep -v ^root shadow > /dev/shm/foo # copy old password configuration without # root password to temporary file

    grep ^root /etc/shadow >> /dev/shm/foo # paste new root password to temp file

    mv /dev/shm/foo /var/media/Fedo*/etc/shadow

  8. Restart your machine without the live media.

  9. You can now login into your Fedora 14 as root and set a new password for all the users, for which you have forgotten the passwords.

Ready! :-)

PS: Please vote up, if you liked my answer.

PPS: I did not try it. It was just written out of my memory.

edit flag offensive delete link more


This screenshot is very clearly not from Fedora 14. It's also a very obfuscated and failure-prone way to solve the missing root password problem...

randomuser gravatar imagerandomuser ( 2013-02-02 17:02:19 -0500 )edit

answered 2013-02-02 01:44:13 -0500

You should reinstall Fedora. The system is surely recoverable, but Fedora 14 is no longer supported.

I suggest you download a Fedora Live Image ([the default option] ( and use it to recover any data you want to save before continuing to installation.

edit flag offensive delete link more

Question Tools


Asked: 2013-02-02 00:39:56 -0500

Seen: 415 times

Last updated: Feb 03 '13