TMAegis
aix 관련 규칙 더 보기

TMA-AIX-4.1.2.1

Ensure local user Home directories exists

보통레벨 1자동aix

설명

All accounts must have a trusted started point - a HOME directory. A missing home directory on many systems places the account in a default directory. Examples include: / and /home/guest. This recommendation is specifically about locally administered accounts (in AIX terms, -R files). Audit: unlocked accounts with uid >= 200 must have an existing HOME directory.

점검 방법

감사 방식: 셸 명령

shell
command -v lsuser >/dev/null 2>&1 || exit 1; out=$( { lsuser -R files -a id home account_locked ALL | while read name ids homes locks rest; do uid=${ids#id=}; home=${homes#home=}; locked=${locks#account_locked=}; [ "$uid" -ge 200 ] 2>/dev/null || continue; [ "$locked" = true ] && continue; [ -d "$home" ] || echo "$name: missing HOME $home"; done ; } 2>/dev/null ); [ -z "$out" ] && echo compliant || printf '%s\n' "$out" | head -n 20
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

Lock local accounts with UID >= 200 when HOME directory does not exist: #!/usr/bin/ksh -e # Provided to CIS by AIXTools # Copyright AIXTools, 2022 lsuser -R files -a id home account_locked ALL | while read name ids homes locks rest; do uid=$(echo ${ids} | cut -f2 -d =) if [[ ${uid} -ge 200 ]]; then home=$(echo ${homes} | cut -f2 -d =) locked=$(echo ${locks} | cut -f2 -d =) if [[ ${locked} == "true" ]]; then continue elif [[ ! -d ${home} ]]; then /usr/bin/printf "Locked Account [%s]: Missing \${HOME} at: %-32s\n" ${name} ${home} /usr/bin/chuser -R files account_locked=true ${name} fi fi done

속성

운영 체제
모두
태그
aixaccounts
참고 자료
CIS IBM AIX 7 Benchmark v1.2.0 - 4.1.2.1 Ensure local user Home directories exists

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target aix