Have Oralce VM VirtualBox and FedoraClient21 64bit is installed in the VM. I cannot remember the root password. As soon as I start up Fedora, I see two options of FedoraClient 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?
Same way you open up any machine that you have direct access to. Press esc / shift (depending on grub version) to get the menu on boot, then
e to edit the boot command, add
init=/bin/bash at the end of the "linux ...." kernel commandline. Then boot to the root shell, remount as r/w, and change password.
In latest CentOS or Fedora versions, there are some small changes in resetting the root password:
While booting up your machine, select the existing kernel and press ‘e’ Replace the entry ‘ro‘ with ‘rw init=/sysroot/bin/sh’ save chroot /sysroot touch /.autorelabel Now reboot your machine. It may take some time to apply the apply the changes while booting up.
I just referred the below link:
The following works for pretty much all Linux distro's:
- Boot from a live linux system (most distro's offer this on there installation CD, but it doesn't have to be the same as the distro you installed). In your case couple the ISO of the cd to virtualbox
- Mount the partition of your 'real' system somewhere. Depending on the device and the place where you will mount it, it will be something like:
mount /dev/sda1 /mnt
- Switch the environment to your real system with a shell:
chroot /mnt /bin/bash
- Change the password:
shutdownthe system and remove the CD (or in your case ISO-file)
I had the same problem on my Fedora VM, rebooting in rescue mode didn't detect my root volume. you can use fdisk to look for the the root volume manually or like I did, I tried AutoRoot, it worked perfectly for me. The great thing about it, it also support other linux distribution.