The ESXi Photon OS in vCenter 7.0.3 can be tricky when attempting to reset the root password. Traditional methods like pressing “e,” “Shift,” or “Escape” to enter GRUB may not respond as expected. Don’t worry; you’re not alone in this struggle.
Table of Contents
Problem Description
You need to reset the ESXi vCenter Server 7.0.3.01700 root password. Previous methods using PowerShell and VMwareCLI have failed. Attempts to access GRUB by pressing “e,” “Shift,” or “Escape” have been unsuccessful. The root and [email protected] accounts are inaccessible, potentially due to an expired password or undocumented changes. The server boots fully into the OS but doesn’t respond to key presses during boot for GRUB access.
Here’s a foolproof way to reset your root password.
Solution 1: Reset root password using SSH
- Connect to the ESXi host using SSH
- Enter “ALT+F1” to access the ESXi console
- Log in with your current credentials
- Run the command “passwd” to change the root password
- Enter your new password twice to confirm
If SSH is disabled, you’ll need to enable it:
- Connect to the DCUI (Direct Console User Interface) of the ESXi host
- Press F2 to customize the system
- Navigate to “Troubleshooting Options”
- Enable “ESXi Shell” and “SSH”
- Follow the previous steps to reset the password
For expired [email protected] accounts:
- Log into the vCenter Server Appliance (VCSA) shell as root
- Run “shell.set –enabled true” to enable the Bash shell
- Enter “shell” to access the Bash shell
- Use “chage -l [email protected]” to check the account’s expiration
- Run “chage -E -1 -M 999 [email protected]” to disable expiration
Solution 2: Reset root password using Live CD
- Download a Linux Live CD ISO (like Ubuntu).
- Mount the ISO to the vCenter server using N-able.
- Reboot the server and boot from the Live CD.
- Once booted into the Live CD, open a terminal.
- Identify the root partition with lsblk or fdisk -l.
- Mount the root partition: sudo mount /dev/sdaX /mnt
- Change root to the mounted partition: sudo chroot /mnt
- Use passwd to reset the root password: passwd root
- Set a new password when prompted.
- If the GRUB configuration is the issue, update it: update-grub
- Exit chroot: exit
- Unmount the partition: sudo umount /mnt
- Reboot the server: sudo reboot
If issues persist, check your BIOS/UEFI settings to ensure no secure boot settings are preventing GRUB access. This method provides a clean slate, ensuring you regain control. Good luck!