This article describes how ESXi enforces password requirements and lockout behavior, outlines default and recommended settings, and provides sample configurations that align with security principles.
Security.PasswordQualityControl controls password complexity for local ESXi accounts (including root).retry=3 min=disabled,disabled,disabled,7,7
This means:
min= ComponentThe min= portion of the policy has 5 comma-separated slots, reflected in this order:
min = N0, N1, N2, N3, N4
Where:
| Slot | Meaning / Context | VMware/Community Default / Behavior |
|---|---|---|
| N0 | Required length when password uses only one character class | Usually disabled (disallowed) |
| N1 | Required length for passwords using two character classes | disabled by default |
| N2 | Required length when password is a “phrase” (passphrase style) | Usually disabled by default |
| N3 | Required length when password uses three character classes | Default = 7 |
| N4 | Required length when password uses four character classes | Default = 7 |
Key insight: Because N0, N1, and N2 are often disabled, ESXi enforces that passwords must use at least 3 character classes (e.g. uppercase + lowercase + digits or special) to be valid at all.
Also, some edge cases may occur: characters at the beginning or end of the password may not count toward certain class requirements depending on internal parsing.
The following configuration enforces a strong password policy with the requirements:
Since the pam_passwdqc module does not allow specifying the exact number of characters per class, this configuration enforces the use of all four classes with a minimum length of 14:
retry=3 min=disabled,disabled,disabled,disabled,14
Meaning:
Command to Apply:
esxcli system settings advanced set -o /UserVars/Security.PasswordQualityControl -s "retry=3 min=disabled,disabled,disabled,disabled,14"
Command to Verify:
esxcli system settings advanced list -o /UserVars/Security.PasswordQualityControl
To allow both three-class and four-class passwords with a minimum length of 14 characters, use:
retry=3 min=disabled,disabled,disabled,14,14
Security.PasswordQualityControl setting, or switch to a more lenient test value temporarily.