In NSX-T password reset is done through GRUB menu. By default GRUB menu is not enabled.We need to enable GRUB on root mode.To reset password for NSX-T manager first check the NSX-T version that is being in use.
Step1: Enable GRUB menu when you have root password
Step2:Reset password once you have GRUB mode enable
Step3:Enabled GRUB menu when root password is forgotten
The above steps are described in details as below
Step1: Enable GRUB menu when you have root password.
GRUB mode menu enabled by login to root mode. So root mode password is required.
However, if you have root mode password then you can easily reset admin password no need to bother about grub and all. So it seems chicken & egg problem.
Follow below VMware document based on your NSX version to enable GRUB menu.
https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.0/installation/GUID-4630C9D5-71FB-4991-AC1D-9FDBA0B86120.html
https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.1/installation/GUID-4630C9D5-71FB-4991-AC1D-9FDBA0B86120.html
https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.2/installation/GUID-4630C9D5-71FB-4991-AC1D-9FDBA0B86120.html
Check if GRUB is enabled or not from grub file located at /etc/default/grub. Note If you see any value Infront of keyword GRUB_TIMEOUT or GRUB_HIDDEN_TIMEOUT it means grub menu is enabled.
Refer below snip
Step2: Reset password once you have GRUB mode enable.
Once you enable GRUB mode then you can easily reset the password following below document. Note you must authenticate with GRUB password before you reset root and admin password.
Each version of NSX-T has its own GRUB password. Follow below link to check GRUB password and reset steps.
In case you forget the root, password, and admin both and want to reset it then the only option we have is to enabled GRUB MENU. Follow below steps to enabled GRUB.
Note: this is not official recommended procedure, the steps mentioned below are taken from website https://thefluffyadmin.net/?p=1455
Step3: Enabled GRUB menu when root password is forgotten
1. Shut down the NSX Manager.
2. Download the Ubuntu 16.04 .iso file from https://old-releases.ubuntu.com/releases/16.04.6/ubuntu-16.04-server-amd64.iso
3. Launch the vSphere or ESXi graphical user interface (GUI).
4. Import the Ubuntu .iso file into the applicable datastore for the NSX Manager VM.
5. Edit the settings of the NSX Manager VM and add a CD ROM Drive device if it does not exist.
6. In the CD ROM Drive configuration, check the Connect at power on checkbox.
7. In CD/DVD Media, press Browse and select ubuntu-16.04.6-server-amd64.iso from the applicable datastore.
8. Click Save to exit the Edit settings page.
9. Power on the NSX Manager.
10. Connect to the console of the appliance.
11. Reboot from CD or you can press ESC and choose CD to boot.
12.Server boots from CD, Select Language and press enter
13. We would see the Ubuntu Menu
14. Select ‘Rescue a Broken System.
15.On Successive Screens, select Language, Country, Keyboard.
16. In Configure Network option, select one of the NIC’s and a Host name. Wait for DHCP to time out.
17. You will be prompted to enter a device to use as the root file system. Select the Do not use a root file system option using the down arrow key and press Enter.
18. You will now be prompted to enter rescue mode. Select Execute a shell in the installer environment and press Enter.
19. Confirm by selecting the Continue option and press Enter.
Partition Mounting:
a. /dev/sda2 is the root ‘/’ partition.
b. Thus, we will be mounting that boot and the config partitions for grub to be updated.
20.On the command prompt, enter below commands
a. mount /dev/sda2 /mnt
b. mount –bind /dev /mnt/dev
c. chroot /mnt
d. mount /config
e. mount /boot
21. Once the root partition is mounted. Browse to the directory # cd /etc/default
22. Take a backup of grub file # cp grub grub.bkp
23. Once we read the grub file, # cat grub. There is a Line that says GRUB_TIMEOUT=
24. We need to modify that. Use below command
sed -i ‘s/GRUB_TIMEOUT=/GRUB_TIMEOUT=2/g’ grub
25.Run # update-grub
26. Run #sync
27. #Exit, till we reach the Rescue Mode option
28. Reboot the server.
29. Once Rebooted. The NSX manager will reboot in GRUB menu
30.Now follow step2 to reset the password of root and admin user
Summary:
1.NSX-T support password reset via GRUB mode only
2.You have to ensure that the GRUB menu is enabled. This can be done by login through root mode and then make a changes
3.In case you don’t have root password then you won’t be able to enable GRUB menu, then we have to follow unsupported method(Step3) to enable GRUB mode.
4.Once the GRUB mode is enabled , then password reset procedure is straight forward. just follow the document to proceed password change.
5.GRUB password depends on the NSX-T version we use, so check concern document based on NSX-T version