Resetting a lost or forgotten root/admin password for TCA Manager or TCA-CP appliance.
Resolution
The following steps can be followed to reset root/admin password in the TCA Manager or TCA-CP.
IMPORTANT: The procedure is subject to change based on the Linux flavor and version used to boot the system in single-user mode. In this example, Ubuntu 20.04 Desktop, so make sure to get up to date information from public sources for the Linux type and version of choice.
Note: In this example the focus is on the TCA Manager but the procedure also applies to the TCA-CP.
Take a snapshot of the TCA Manager or TCA-CP appliance as a safe measure in case you need to revert.
Launch the vSphere or ESXi graphical user interface (GUI).
Upload the Ubuntu .iso file into the accessible datastore for the TCA Manager VM.
Shut down the TCA Manager appliance.
Booting into the BIOS requires changing the boot order as the VM boots very fast. To do this go to Edit Settings of the TCA Manager VM, from the VM Option section go to Boot Options and check the box to enable the During the next boot, force entry into the BIOS setup screen option under Force BIOS setup.
From the Virtual Hardware section of the TCA Manager VM add a CD ROM Drive device if it does not exist.
In the CD ROM Drive configuration, check the Connect at power on checkbox.
In CD/DVD Media, press Browse and select ubuntu-xxxx.iso from the accessible datastore.
Click Save to exit the Edit settings page.
Power on the TCA Manager appliance.
The TCA Manager should boot into the BIOS. Access the Boot Menu and select CD-ROM Drive as the boot device.
On the next step, select Try Ubuntu without installing but do not press "enter" and press "F6" to get below option.
Press "ESC" to drop into the CLI. Enter systemd.unit=rescue.target to end of the boot options.
Press "Enter" and "Crtl+C" to cancel file system check.
Press "Enter" to continue to maintenance mode and enter below to reset root password. Do not enter "Ctrl+d" option as it will boot into normal mode.
mount /dev/sda2 /mnt mount --bind /dev /mnt/dev chroot /mnt passwd exit umount /mnt/dev umount /mnt sync exit
The above steps may need to be performed also for partition /dev/sda3.
To reset admin password use: passwd admin.
After having reset the password, revert the changes to the TCA Manager VM by removing the Force BIOS Setup option, disconnecting the Live CD and confirm the boot device is the virtual hard drive.
Reboot the appliance and login with the new password.
Additional Information
Impact/Risks: Unable to login to TCA Manager or TCA-CP using "admin" and/or "root" account to perform administrative tasks. There is NO impact to TCA services while access remains forbidden. The recovery procedure requires a reboot of the TCA Manager or TCA-CP.