To set the root password to never expire : chage -I -1 -m 0 -M 99999 -E -1 root
To reset the password, follow the steps below:
Take a snapshot or backup of the VCD Appliance before proceeding.
Open a web console to the VCD appliance from vCenter UI.
Reboot the VCD Appliance and switch to the web console tab.
After the Photon OS starts, press the e key to enter the GNU GRUB Edit Menu.
Note: You might have to give the VM console focus by clicking in its window before it will register input from the keyboard.
Locate the line that begins with the word linux.The below screenshot shows the view from a VCD 10.6 appliance.
Append these entries to the end of the line:
rw init=/bin/bash
The line should look like the following screenshot:
F10 to continue booting.
Run the command
mount -o remount,rw /
Unlock/Reset the 'root' account using below command if it is already locked due to multiple logins with incorrect password.
For VCD 10.6 : /usr/sbin/faillock --user root --reset
For VCD 10.4 and VCD 10.5 : pam_tally2 --user=root --reset
In the Command prompt, enter the command passwd and provide a new root password (twice for confirmation).
Note: When entering the new password in VCD 10.6, ensure that it is atleast 15 characters in length and complex. Note: For VCD 10.4 and 10.5, the appliance certificate private key must be updated to use the new password. Please follow the steps 3-7 as per the documentation to carry out these changes.
Unmount the filesystem by running this command
umount /
Reboot the Cloud Director Appliance by running this command:
reboot -f
Confirm that you can access the Cloud Director Appliance using the new root password via SSH or VAMI.
You can now delete the snapshot of the VMware Cloud Director appliance.
Additional Information
Starting with version 10.4,Cloud Director uses Photon 3 OS on the appliance. See release notes for more information.
Starting with version 10.6,Cloud Director uses Photon 4 OS on the appliance. See release notes for more information.
For the VMware Cloud Director appliances, password complexity rules and yearly account password expiration for the root account are enforced. Please check the 'Administrative Credentials' as per our security documentation for more information.