0

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?

1

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.

| improve this answer | |
1

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:

Reset the root password in CentOS7

| improve this answer | |
1

The following works for pretty much all Linux distro's:

  1. 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
  2. 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
  3. Switch the environment to your real system with a shell: chroot /mnt /bin/bash
  4. Change the password: passwd
  5. exit the chroot, shutdown the system and remove the CD (or in your case ISO-file)
| improve this answer | |
0

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.

http://vnugget.com/python/autoroot-automatically-reset-the-root-password-on-linux-machines/

| improve this answer | |
  • I'd be worried that that VM is using a EoL release but also if its a local vm use a live to reset pass via a chroot. – linuxdev2013 Jul 9 '16 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.