3

I have an Oracle VirtualBox VM, with FedoraClient 21 64-bit installed. I cannot remember the root password. As soon as I start up Fedora, I see two options of Fedora: "Client" and "Rescue". Both all start up and leaving me at localhost login.

Is there a way to reset the root or local login password before it reaches to the localhost login prompt?

dhag
  • 15,736
  • 4
  • 55
  • 65
LPGA
  • 43
  • Can you mount your VM's file system on your local system? Then you could edit the root password, see http://ubuntuforums.org/showthread.php?t=1655265 for possible steps. – dhag Mar 20 '15 at 21:39

1 Answers1

1

Reset Password Using a Fedora CD/DVD:

Usage cases
This method should work to reset the root password if the boot loader is password protected.  Or if you have a Fedora 19 (or newer) installation where booting to the rescue mode (which now invokes /sbin/sulogin) will ask you for the root password to proceed.

Using any of the Fedora Live Media

  • Boot the Live installation media

  • After it finishes booting and starts the live session, open a terminal and switch to root (using su, it won't ask for a password)

  • Create a directory where you can mount the filesystem of your installation:
    mkdir /mnt/sysimage

  • Mount the filesystem of your installation (/dev/sda1 is just an example, be sure to fill in the actual device node of your installation root / partition):
    mount /dev/sda1 /mnt/sysimage

  • chroot to your installation:
    chroot /mnt/sysimage/

  • Change the root password:
    passwd

  • Exit from the chroot:
    exit

That's it, simply reboot your system and then boot the installation from the HDD as usual.