In ESXi, root, dcui and vpxuser are predefined users. Starting from 8.0, shell access for the non-root ESXi users, such as vpxuser and dcui, can be deactivated.
ESXi 8.0
Due to strict security policies in some organizations, it's necessary to limit the number of active accounts with shell access.
Staring from ESXi 8.0, shell access of the non-root users, such as dcui and vpxuser, can be deactivated by below commands.
Firstly ssh to the ESXi as root and verify that current shell access for all users are activated (true),
[root@#####:~] localcli system account list
User ID Description Shell access
------- ----------------------------------------- ------------
root Administrator true
dcui DCUI User true
vpxuser VMware Workstation administration account true
To deactivate shell access for a non-root user, for example, dcui, run below command,
[root@#####:~] localcli system account set --id dcui --shell-access false
Then list down all users again to make sure shell access for dcui changes to false,
[root@#####:~] localcli system account list
User ID Description Shell access
------- ----------------------------------------- ------------
root Administrator true
dcui DCUI User false
vpxuser VMware Workstation administration account true