Configure the Local User Password Expiration Policy for ESXi
Define the interval of time before the password of a local user on an ESXi host in
VMware Cloud Foundation
expires and a change is enforced.Setting | Default Value |
---|---|
Security.PasswordMaxDays | 99999 |
Prerequisites
If you plan to reduce the expiration
period of a local account's password, rotate the password of the account by using
SDDC Manager. See Rotate Passwords.
The password expiration date is
determined by adding the password expiration period to the date of the last password
change. If the time since the last password change is greater than the new
expiration period, the password expires immediately.
UI Procedure
- Log in to the management domain vCenter Server athttps://<management_vcenter_server_fqdn>/uiby using an account withAdministratorprivileges.
- In theHosts and clustersinventory, expand the management domain vCenter Server tree and expand the management domain data center.
- Expand the default management vSphere cluster.
- Select the first ESXi host and click theConfiguretab.
- In theSystemsection, clickAdvanced system settings.
- On theAdvanced system settingspage, clickEdit.
- In the key filter text box, enterSecurity.PasswordMaxDays, enter a value for the setting according to the requirements of your organization, and clickOK.
- Repeat this procedure on the remaining hosts in the cluster.
- Repeat this procedure on the remaining clusters in the management domain.
- Repeat this procedure on all clusters in the VI workload domains.
PowerShell Procedure
- Start the Windows PowerShell console.
- Replace the values in the sample code and run the commands in the PowerShell console.$sddcManagerFqdn = "sfo-vcf01.sfo.rainpole.io" $sddcManagerUser = "administrator@vsphere.local" $sddcManagerPass = "VMw@re1!" $sddcDomainName = "sfo-m01" $cluster = "sfo-m01-cl01" $maxDays = "99999"
- Perform the configuration by running the command in the PowerShell console.Update-EsxiPasswordExpiration -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass -domain $sddcDomainName -cluster $cluster -maxDays $maxDays
- Repeat this procedure for all remaining clusters in the management domain.
- Repeat this procedure for all VI workload domains and their clusters.