Selasa, 21 Februari 2023

VMWARE-reset root pass

 

Resetting root password in VMware vCenter Server Appliance

Recently I came accross vCenter server in my infrastructure where root password was not working. So I thought of resetting forgotten root password. Before starting reset process make sure to take the snapshot of  vcsa (VMware vCenter server appliance) virtual machine. This way it be can ensured there won't be any not mess anything on vm while doing this low level activity.

Microsoft vmware vsphere vcenter server snapshot take snapshot manager vcsa vcenter appliance reset root password management.png

Related ArticlevCenter Server SSH received disconnect Too many authentication failures

To reset root password of VCSA there is downtime required. In the downtime window reboot vCenter server. I am running latest vCenter server version 7.x, It is running on PHOTON OS Version 3.0. After reboot once the below splash screen appears, press e button on the keyboard.

VMware vSphere vCenter Server Photon os linux root password reset esxi snapshot take manager virtulization reset root password passwd operating system linux.png

On the GNU GRUB menu type rw init=/bin/bash after $systemd_cmdline. And press Ctrl-x or F10 to boot, as shown below.

GNU GRUB version 2.02~rc2
set params 'Photon'

     linux /$photon_linux root=$rootpartition $photon_cmdline coredump_fi\
lter=0x37 consoleblack=0 $systemd_cmdline rw init=/bin/bash
     if [ -f /$photon_initrd ]; then
          initrd /$photon_initrd
     fi

Minimum Emacs-like screen editing is supported. TAB lists
completions. Press CTRL-x or F10 to boot, Ctrl-c or F2 for a 
command-line or ESC to discard edits and return to the GRUB 
menu.

VMware vSPhere vCenter server appliance gnu grub photon os rw init bin bash systemd cmdline reset root press f10 to boot initrd discard edits.png

This will cause to boot vCenter server appliance into root shell, After completing boot run below commands one by one. While resetting root password make sure you are not using dictionary word for password or you may end up into failed message - passwd: Authentication token manipulation error with password unchanged.

Note: You can change the root password expiry time using command chage -I -1 -m 0 -M 99999 -E -1 root.

mount -o remount,rw /
passwd
umount /
reboot -f

Microsoft putty linux os vmware vsphere vcenter server appliance mount -o remount,rw root folder passwd authentication token manipulation error password unchanged umount reboot -f esxi.png

Once root password is reset successfully, you can use ssh or putty tool to connect vCenter server, if connection is successful, you can delete snapshot from VM.

If you are using vCenter version 6.7 P03 or 7 U1 and above, this is another quick way of change password of root user, if you already know it without downtime using VAMI portal. Open vCenter VAMI portal with 5480 port. Use your SSO admin or administrator@vsphere.local username and password to login.

Vmware vsphere vCenter server vami vcenter appliance management interface esxi administrator@vsphere.local reset root password login 5480.png

Click on the Actions on the menu, from dropdown list choose Change Root Password and SAVE it.

Vmware vSPhere vCenter server appliance vcsa vami portal 5480 port reset root password administrator@vsphere.local change root user password save single sign on vami portal.png

Useful Articles
RESOLVED : FAIL TO DEPLOY OVF TEMPLATE - TASK CANCELED BY USER

Tidak ada komentar:

Posting Komentar