Container-Optimized OS
TMA-COS-5.3.1.4
Ensure inactive password lock is 30 days or less
높음레벨 2자동cos
설명
User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled. Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.
점검 방법
감사 방식: 셸 명령
shell
bad=0; [ -r /etc/shadow ] || exit 1; v=$(sed -n "s/^INACTIVE=//p" /etc/default/user[a]dd 2>/dev/null | tail -1); [ -n "$v" ] && [ "$v" -ge 0 ] && [ "$v" -le 30 ] || bad=1; for x in $(awk -F: '$2 ~ /^[^*!xX]/ && $2 != "" {print ($7==""?"-1":$7)}' /etc/shadow); do [ "$x" -ge 0 ] && [ "$x" -le 30 ] || bad=1; done; [ $bad -eq 0 ] && echo compliant || echo noncompliant- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30 Modify user parameters for all users with a password set to match: # chage --inactive 30 <user>
속성
- 운영 체제
- 모두
- 태그
- authcontainer-optimized-oscos
- 참고 자료
- CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.3.1.4 Ensure inactive password lock is 30 days or less
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target cos --level 2