TMAegisBeta
More rules for aix

IBM AIX

TMA-AIX-4.7.3

Ensure loginretries is configured

MediumLevel 1Automatedaix

Description

Defines the number of attempts a user has to login to the system before their account is disabled. In setting the loginretries attribute, this ensures that a user can have a pre-defined number of attempts to get their password right, prior to locking the account. Audit: default loginretries must be 5 (1-5 accepted; 0 disables lockout).

How it is checked

Audit method: Shell command

shell
command -v lssec >/dev/null 2>&1 || exit 1; out=$(lssec -f /etc/security/user -s default -a loginretries 2>/dev/null) || exit 1; v=$(printf '%s\n' "$out" | sed -n 's/.*loginretries=\([^ ]*\).*/\1/p'); if [ -n "$v" ] && [ "$v" -ge 1 ] && [ "$v" -le 5 ]; then echo compliant; else echo "loginretries=$v"; fi
Expected output
compliant

How it is fixed

Fix method: Shell command

shell
chsec -f /etc/security/user -s default -a loginretries=5

Properties

Operating systems
Any
Tags
aixaccounts
Reference
CIS IBM AIX 7 Benchmark v1.2.0 - 4.7.3 Ensure loginretries is configured

Check this host

Run this on a machine you are allowed to audit. The scan is read-only.

shell
tmaegis scan --target aix