To reset the root password for the Fleet Management Appliance:
- Before proceeding with the steps below, take a snapshot of the Fleet Management Appliance.
- Reboot the Fleet Management Appliance.
- After the Photon OS starts, press the e key to enter the GNU GRUB Edit Menu.
- Locate the line that begins with the word "Linux".
- Append these entries to the end of the line
rw init=/bin/bash
- Press the F10 key to continue booting.
- Run the command
mount -o remount,rw /
- Unlock the 'root' account using the command below if it is already locked after multiple failed login attempts with incorrect passwords.
/usr/sbin/faillock --user root --reset
- Enter the new root password twice to confirm
passwd
- Unmount the filesystem by running this command (yes, the unmount command is umount - it's not a spelling error):
umount /
- Reboot the appliance by running this command:
reboot -f
- Verify access to the appliance using the new root password.
- Remove the initial snapshot if applicable.
- Check the status of the root account's expiration:
chage -l root
- Set the root account never to expire:
chage -m 0 -M -1 root
- Confirm that the root account is no longer expired:
chage -l root