How to recover GRUB and Root password on VCSA This article will provide the step by step screenshot to recover the VMware vCenter Appliance

This article will provide the step by step screenshot to recover the VCSA (5.5 and 6.0 tested) 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 or live cd such Hiren’s Boot CD.

RECOVER GRUB PASSWORD

If you deployed a VCSA changing grub password, and you lost it, you can remove it following this steps. Default grub passsword for VCSA is ‘vmware‘:

  1. Power OFF VCSA Server (it culd be a Physical server or VM);
  2. Insert a Live Boot CD linux for recover (Live Linux, Hiren’s Boot etc..);
  3. Power ON the Server, then Boot from CD;
  4. Start Recovery procedure from CD;
  5. Mount VCSA file system on a mount point like ‘/mnt/vcsa‘, in RW mode: ‘mount -o remount,rw /partition/identifier /mount/point‘;
  6. Navigate into /mount/point/boot/grub;
  7. List file into grub and find ‘menu.lst‘;
  8. Ensure to backup menu.lst: ‘cp menu.lst menu.lst.bck‘;
  9. Edit menu.lst with Vim editor or similar, then remove or place # to comment the ‘Password’ row:Recover Grub Password, commented ‘password’
  10. Exit VIM saving;
  11. Reboot Server.

RECOVER ROOT PASSWORD

  1. Start the VCSA Server (or 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.

    Recover Root Password Linux
    Recover Root Password Linux
  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;
  6. Set the new root password for VCSA ‘passwd root’;
  7. Exit the shell using “exit” command.

Once the system is booted , you should be able to login with new root password.

Related article: