• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

How to break GRUB / Recover Root password on VCSA 6.0 ?

April 2, 2016 By Cloud_Devops 21 Comments

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:

  1. Halt the VCSA 6.0 VM and attach the RHEL 7.0 ISO image in virtual CDROM.
Attach RHEL 7.2 DVD to the VCSA 6.0 VM
Attach RHEL 7.2 DVD to the VCSA 6.0 VM

 

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.

Boot the VM from RHEL 7.2 DVD.
Boot the VM from RHEL 7.2 DVD.

 

3. Select the rescue mode and press enter to continue.

 RHEL7.2 Rescue Mode
RHEL7.2 Rescue Mode

 

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.

VCSA 6.0 Continue to mount in RW mode
VCSA 6.0 Continue to mount in RW mode

 

5.  VCSA 6.0’s root filesystem is mounted under /mnt/sysimage and you got the shell to play with this.

VCSA 6.0 Rescue Mount
VCSA 6.0 Rescue Mount

 

6. Navigate to /mnt/sysimage/boot directory and list the contents.

List the mnt-sysimage contents
List the mnt-sysimage contents

 

7. Navigate to grub directory and list the contents. “menu.lst” is the file which holds the GRUB boot loader password.

VCSA 6.0 List GRUB directroie contents
VCSA 6.0 List GRUB directroie contents

 

8. Use “vi” editor to edit the menu.lst file. ( vi menu.lst).

VCSA 6.0 Remove Password line from menu.lst
VCSA 6.0 Remove Password line from 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,

VCSA 6.0 Password Line Removed
VCSA 6.0 GRUB Password Line Removed

 

9. Exit the shell (Which will reboot the system automatically.). You need to detach the ISO image from VM hardware settings.

VCSA 6.0 Exit the shell
VCSA 6.0 Exit the shell

 

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.

GRUB Menu VCSA 6.0
GRUB Menu VCSA 6.0

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.

Edit the Kernel Line - VCSA 6.0
Edit the Kernel Line – VCSA 6.0

 

3. Append “init=/bin/bash” in this step and press enter.

Set the shell to pass to kernel
Set the shell to pass to kernel

 

4. Press “b” to boot the system.

Press b to boot from new kernel value VCSA 6.0
Press b to boot from new kernel value

 

5. You will get the bash like below.

Single user Shell for VCSA 6.0
Single user Shell for VCSA 6.0

 

6. Set the new root password for VCSA 6.0.

Set new root password
Set new root password

 

7. Exit the shell using “exit” command.

 

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

Successful login
Successful login

 

Hope this article is informative to you. Share it ! Comment it !! Be Sociable !!!

Filed Under: VCSA 6.0, VMware, VMware vSphere 6.0 Tagged With: VCSA 6.0, VMware, VMware vSphere 6.0

Reader Interactions

Comments

  1. shanedawg says

    December 22, 2023 at 4:50 am

    Still helping people in 2023. Thanks!

    Reply
  2. Hasan Hasanusta says

    August 17, 2021 at 5:24 pm

    Thank you so much.
    I did it using centos 7.

    Reply
  3. Shaun says

    December 23, 2020 at 4:39 pm

    Hi,

    Very easy to follow and I have now got root access to vCenter via console. However the web page is now failing to load and I cannot login in with vSphere client. SSH from a remote machine is also failing to connect.

    The prompt is still red in colour. red isnt usually a good colour. Do we need to set a new GRUB password?

    Reply
  4. Hao Nguyen says

    October 6, 2020 at 7:30 pm

    How to break GRUB / Recover Root password on VCSA 6.0:
    You will need a Centos 8.2 to access the /dev/sda3 or root mount then you can comment out the password line in the menu.lst

    Reply
  5. YannEZ says

    October 30, 2019 at 5:10 pm

    This worked perfectly awsome tutorial you saved me from a lot of troubles !!!!

    Reply
  6. Nayram says

    June 27, 2019 at 10:24 pm

    Thanks and thanks

    Reply
  7. Amar Tadjine says

    May 23, 2019 at 8:13 pm

    Worked perfectly for me!
    Thank you

    Reply
  8. Malec says

    March 24, 2019 at 2:12 am

    Works perfectly! Saved my life!

    Reply
  9. Boules says

    March 12, 2019 at 4:36 am

    awesome, working like a magic

    Reply
  10. Ralph-Uwe Peter says

    January 24, 2019 at 9:05 pm

    This just saved my day. thanks a bunch!!!

    Reply
  11. MA says

    September 17, 2018 at 7:09 am

    The boot folder didn’t have anything in it.

    Reply
  12. Sysadminview says

    May 12, 2017 at 8:35 am

    Excellent, Great work bro! this method worked perfectly for me! Thank you!

    Reply
  13. Peter says

    April 28, 2017 at 1:36 pm

    Thanks for the guide – working until I exit the bash after entering the new password. After typing exit I get an “kernel panic not synching…” error and the new password is not saved as I had to discover after rebooting.

    Reply
  14. TheFluffyadmin says

    April 11, 2017 at 6:14 pm

    Also works for PSC
    However, I also ran into the kernel panic as Robert described above.
    It seems shutdown command doesn’t work, so I did reboot -f instead. that shut down the VM cleanly.
    It looks like VMware may have made this process easier in 6.5 : https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2147144

    Reply
  15. mhmd says

    February 27, 2017 at 3:38 pm

    thank you so much it was really helpful

    Reply
  16. Salvatore says

    February 21, 2017 at 5:46 am

    Does it work for PSC as well?

    Reply
  17. Salvatore says

    February 21, 2017 at 5:45 am

    Does this work for PSC?

    Reply
  18. Robert says

    February 15, 2017 at 4:35 am

    Thanks so much for this article, you are a life saver 🙂 However I did have a minor issue when following the process….

    My customer was having trouble trying to login using the root password… This process worked up until the last step. After I typed exit, the appliance would panic and the password never saved.

    I tried the process several times and it would Panic at the same point every time. The only way I was able to complete the process, was after I halted the appliance using the halt command and then manually reset it.

    Cheers for the help!

    Reply
  19. Robert says

    February 15, 2017 at 4:34 am

    Thanks so much for this article, you are a life saver 🙂 However I did have a minor issue when following the process….

    My customer was having trouble trying to login using the root password… This process worked up until the last step. After I typed exit, the appliance would panic and the password never saved.

    I tried the process several times and it would Panic at the same point every time. The only way I was able to complete the process, was after I halted the appliance using the halt command and then manually reset it.

    Cheers for the help!

    Reply
    • Scott says

      April 14, 2021 at 11:51 pm

      Had the exact same situation as Robert and would have been stumped without this reply. Thanks, friend!

      Reply
  20. TheFluffyadmin says

    December 7, 2016 at 5:42 pm

    Excellent, this worked perfectly for me! Thank you!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version