TMAegis
macos のその他のルール

macOS

TMA-MACOS-5.2.1

Ensure Password Account Lockout Threshold Is Configured

高レベル 1自動macos

説明

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.

チェック方法

監査方法: シェルコマンド

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
期待される出力
compliant

修正方法

修正方法: ガイダンスまたは IaC パッチ

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".

プロパティ

オペレーティングシステム
macos-26
タグ
macossystem-access
参照
CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.2.1 Ensure Password Account Lockout Threshold Is Configured

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target macos