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‘:
- Power OFF VCSA Server (it culd be a Physical server or VM);
- Insert a Live Boot CD linux for recover (Live Linux, Hiren’s Boot etc..);
- Power ON the Server, then Boot from CD;
- Start Recovery procedure from CD;
- Mount VCSA file system on a mount point like ‘/mnt/vcsa‘, in RW mode: ‘mount -o remount,rw /partition/identifier /mount/point‘;
- Navigate into /mount/point/boot/grub;
- List file into grub and find ‘menu.lst‘;
- Ensure to backup menu.lst: ‘cp menu.lst menu.lst.bck‘;
- Edit menu.lst with Vim editor or similar, then remove or place # to comment the ‘Password’ row:Recover Grub Password, commented ‘password’
- Exit VIM saving;
- Reboot Server.
RECOVER ROOT PASSWORD
- 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.
- Press “e” to edit the commands again for the kernel;
- Append “init=/bin/bash” in this step and press enter;
- Press “b” to boot the system;
- You will get the bash;
- Set the new root password for VCSA ‘passwd root’;
- Exit the shell using “exit” command.
Once the system is booted , you should be able to login with new root password.