vCenter 9.1.1 root account becomes permanently locked
search cancel

vCenter 9.1.1 root account becomes permanently locked

book

Article ID: 463008

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

vCenter Server Appliance 9.1.1 may experience an unexpected root account lockout.

Instead of root unlocking after 300 seconds from incorrect login attempts, it remains permanently locked.

Environment

  • vCenter Server 9.1.1

Cause

The issue is due to a root_unlock_time = 0 entry in /etc/security/faillock.conf.

cat /etc/security/faillock.conf
dir = /var/log/faillock
deny = 3
unlock_time = 0
even_deny_root
root_unlock_time = 300
fail_interval = 900
silent
audit
unlock_time = 0
root_unlock_time = 0

 

 

Resolution

A permanent fix will be included in a future vCenter release. In the interim, apply the following workaround to correct the faillock configuration.

1. Take snapshot of the vCenter appliance

2. Download the fix_faillock_conf.py script (attached to this KB)

3. If root is already locked, you'll need to use an SSO administrator account for the following steps

4. Copy the script to the vCenter appliance /tmp/ directory

5. Reset the root account
sudo python3 /tmp/fix_faillock_conf.py --apply --reset-root

6. Check the configuration without changing anything (exit code 0 = fine, 1 = damaged):
python3 /tmp/fix_faillock_conf.py --check

7. See what the script would change:
python3 /tmp/fix_faillock_conf.py

8. Apply the fix if needed. A timestamped backup file will be saved. 
python3 /tmp/fix_faillock_conf.py --apply

9. Confirm, sudo python3 /tmp/fix_faillock_conf.py --check, should say "OK, nothing to repair", and faillock --user root should show no valid failures.

Additional Information

Attachments

fix_faillock_conf.py get_app