TMAegisBeta
Više pravila za macos

macOS

TMA-MACOS15-5.2.1

Ensure Password Account Lockout Threshold Is Configured

VisokaNivo 1Automatskamacos

Opis

The account lockout threshold specifies the amount of times a user can enter an incorrect password before a lockout will occur. Ensure that a lockout threshold is part of the password policy on the computer. Audit: policyAttributeMaximumFailedAuthentications must be set and <= 5.

Kako se proverava

Metod provere: Komanda ljuske

shell
v=$(/usr/bin/pwpolicy -getaccountpolicies 2>/dev/null | /usr/bin/tail -n +2 | /usr/bin/xmllint --xpath '//dict/key[text()="policyAttributeMaximumFailedAuthentications"]/following-sibling::integer[1]/text()' - 2>/dev/null) || exit 1
v=$(printf '%s\n' "$v" | /usr/bin/head -1)
if [ -n "$v" ] && [ "$v" -le 5 ]; then echo compliant; else echo "policyAttributeMaximumFailedAuthentications=${v:-unset}"; fi
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

Profile (preferred): com.apple.mobiledevice.passwordpolicy maxFailedAttempts = <integer><value≤5></integer>. Terminal: sudo /usr/bin/pwpolicy -n /Local/Default -setglobalpolicy "maxFailedLoginAttempts=<value≤5>" ; sudo /usr/bin/pwpolicy -n /Local/Default -setglobalpolicy "maxFailedLoginAttempts=5".

Svojstva

Operativni sistemi
macos-15
Oznake
macossystem-access
Referenca
CIS Apple macOS 15.0 Sequoia Benchmark v2.1.0 - 5.2.1 Ensure Password Account Lockout Threshold Is Configured

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target macos