This article provides commands to check password expiration date of ESXi root user.
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.