This article will provide the step by step screenshot to recover the VCSA 6.0’s root password and breaking the GRUB password. VMware vCenter Appliance(VCSA) is a pre-configured Linux VM based on SUSE Linux. If you forget the root password of the appliance, you need to recover the root password like other Linux Operating systems. Recovering root password is very simple if there is no grub password has been setup or if you know the GRUB boot loader password. If you don’t know the grub password, then you need to reset the grub password first by using Redhat or SUSE Linux DVD.
Environment & Software:
- VMware vCenter Appliance 6.0 (VM)
- Redhat Enterprise Linux 7.2 or CENT OS 7.2 ISO
Break the GRUB password of VCSA 6.0:
- Halt the VCSA 6.0 VM and attach the RHEL 7.0 ISO image in virtual CDROM.
2. Boot the VM in RHEL 7.2 DVD (which we have attached). You can alter the boot device priority in BIOS to make VM to boot from DVD. Navigate to “Troubleshooting” and press enter to continue.
3. Select the rescue mode and press enter to continue.
4. Select “Continue” to mount the VCSA 6.0’s root filesystem in Read/write mode under /mnt/sysimage. RHEL 7.2 is capable to detect the VCSA’s root volume and mounts it.
5. VCSA 6.0’s root filesystem is mounted under /mnt/sysimage and you got the shell to play with this.
6. Navigate to /mnt/sysimage/boot directory and list the contents.
7. Navigate to grub directory and list the contents. “menu.lst” is the file which holds the GRUB boot loader password.
8. Use “vi” editor to edit the menu.lst file. ( vi menu.lst).
*Navigate to password line using arrow keys & press “dd” to remove the complete line. After that just save the file by pressing key sequence “:wq” .
After the modification,
9. Exit the shell (Which will reboot the system automatically.). You need to detach the ISO image from VM hardware settings.
Once the system is booted from hard disk , Just stop the VCSA in GRUB menu to break the OS root password. You could see that GRUB is not protected with password.
Reset the VCSA 6.0 ‘s root password:
1.Start the VCSA 6.0 VM and interrupt the GRUB menu by pressing “ESC” key . Press “e” edit the commands.
If you know the GRUB password , you can pass it by press “p” and enter the GRUB password. If you don’t know the GRUB password , you need to follow the above procedure to break the grub password first.
2. Press “e” to edit the commands again for the kernel.
3. Append “init=/bin/bash” in this step and press enter.
4. Press “b” to boot the system.
5. You will get the bash like below.
6. Set the new root password for VCSA 6.0.
7. Exit the shell using “exit” command.
Once the system is booted , you should be able to login with new root password.
Hope this article is informative to you. Share it ! Comment it !! Be Sociable !!!