Information
The ESXi host must deny shell access for the vpxuser account. The vpxuser account is created by vCenter Server when the host is first attached, and is subseqently used for privileged authentication to ESXi. While the password is automatically rotated by vCenter Server on an interval governed by VirtualCenter.VimPasswordExpirationInDays, it also has shell access which can be deactivated to reduce attack surface.
Users who do not have shell access cannot reconfigure other users' shell access, no matter their privilege levels. Since vCenter Server connects as vpxuser, once vpxuser has been stripped of shell access it will no longer be able to change those user settings for others. Further reconfiguration will need to happen on a host-by-host basis using an account that is authorized.
For security, ESXi 8 no longer supports traditional password or account recovery operations, such as booting from media or changing init to a shell on boot.
Ensure that the host retains at least one fully privileged user, protected well.
NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.
Solution
PowerCLI Command Remediation Example:
$ESXcli = Get-EsxCli -VMHost $ESXi -V2
$arguments = $ESXcli.system.account.set.CreateArgs()
$arguments.id = "vpxuser"
$arguments.shellaccess = "false"
$ESXcli.system.account.set.Invoke($arguments)