This article provides commands to check password expiration date of ESXi root user.
VMware vSphere ESXi
Execute command at ESXi SSH session.
ChangedDay=$(cat /etc/shadow | grep root | awk -F ":" '{print $3}') && MaxDays=$(cat /etc/shadow | grep root | awk -F ":" '{print $5}') && date -d "1970-01-01+$((($ChangedDay+$MaxDays-1)*24))"For example:
Please note in the output, only expiration date is valid, the time isn't accurate.
Please also refer to the Broadcom Knowledge Base (KB) article How to check the last password change date for the ESXi root user.