In my lab I discovered a host that had a root user password something else that I usually use. I was not able to figure it out. Since the host was connected to the vCenter I used a PowerShell script to change it. NB! Make sure the new password meets the complexity requirements.
The script is following:
$esx_hosts = Get-VMHost my_host
foreach ($esx_host in $esx_hosts) {
$esxcli = Get-EsxCli -VMhost $esx_host -V2
$arguments = $esxcli.system.account.set.CreateArgs()
$arguments.id = ‘root’
$arguments.password = ‘Password123’
$arguments.passwordconfirmation = ‘Password123’
$arguments
$esxcli.system.account.set.Invoke($arguments)
}
This script can be used to change root or any other local user password on all ESXi hosts connected to vCenter.