TMAegis베타
azure-container-linux 관련 규칙 더 보기

Azure Container Linux

TMA-AZURE-CONTAINER-LINUX-5.5.1.3

Ensure password expiration warning days is 7 or more

높음레벨 1자동azure-container-linux

설명

The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days. Audit: Passes when PASS_WARN_AGE in /etc/login.defs and the warning period of every account with a password in /etc/shadow are 7 days or more.

점검 방법

감사 방식: 셸 명령

shell
bad=0; [ -r /etc/shadow ] || exit 1; v=$(awk '/^[[:space:]]*PASS_WARN_AGE[[:space:]]/{print $2}' /etc/login.defs | tail -1); [ -n "$v" ] && [ "$v" -ge 7 ] || bad=1; for x in $(awk -F: '$2 ~ /^[^*!xX]/ && $2 != "" {print $6}' /etc/shadow 2>/dev/null); do [ "$x" -ge 7 ] 2>/dev/null || bad=1; done; [ $bad -eq 0 ] && echo compliant || echo noncompliant
예상 출력
compliant

조치 방법

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

Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 Modify user parameters for all users with a password set to match: # chage --warndays 7 <user>

속성

운영 체제
모두
태그
azure-container-linuxpasswordsaging
참고 자료
CIS Azure Container Linux Benchmark v1.0.0 - 5.5.1.3 Ensure password expiration warning days is 7 or more

이 호스트 점검하기

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

shell
tmaegis scan --target azure-container-linux