Configure the root User Account Lockout Policy for vCenter Server
Set the maximum number of failed login attempts and the time that must pass before the account is automatically unlocked for the
root
local account in the vCenter Server appliances in VMware Cloud Foundation
.Setting | Default Value |
---|---|
Maximum number of failed login attempts | 3 |
Unlock time for root | 300 seconds |
Unlock time | 900 seconds |
UI Procedure
- Log in to the vCenter Server appliance using SSH asroot.
- Enable shell access.shell
- Back up the authentication requirements for the appliance using the following command.cp -p /etc/security/faillock.conf /etc/security/faillock.conf-`date +%F_%H:%M:%S`.back
- Verify that all settings for configuring the account lockout policy for therootuser are added in the/etc/security/faillock.conffile.If some properties are missing in the/etc/security/faillock.conffile, add them manually.dir = /var/log/faillock audit silent deny = 3 unlock_time = 1200 even_deny_root root_unlock_time = 300 fail_interval = 900
- To configure the lockout policy for the root user account, in the/etc/security/faillock.conffile, set values to the following properties according to the requirements of your organization and save the file.SettingProperty in/etc/security/faillock.confMaximum number of failed attemptsdenyUnlock time for the root user accountroot_unlock_timeUnlock time for all local accountsunlock_time
- Repeat this procedure for each workload domain vCenter Server.
PowerShell Procedure
- Start PowerShell.
- 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" $maxFailures = "5" $rootUnlockInterval = "300" $unlockInterval = "900"
- Perform the configuration by running the command in the PowerShell console.Update-VcenterAccountLockout -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass -domain $sddcDomainName -failures $maxFailures -unlockInterval $unlockInterval -rootUnlockInterval $rootUnlockInterval
- Repeat this procedure for each workload domain vCenter Server.