TMAegis베타
cos 관련 규칙 더 보기

Container-Optimized OS

TMA-COS-5.5

Ensure access to the su command is restricted

보통레벨 1수동 검토cos

설명

The su command allows a user to run a command or shell as another user. The program has been superseded by sudo , which allows for more granular control over privileged access. Normally, the su command can be executed by any user. By uncommenting the pam_wheel.so statement in /etc/pam.d/su , the su command will only allow users in the wheel group to execute su . Restricting the use of su , and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo , whereas su can only record that a user executed the su program.

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

Run the following command and verify output includes matching line: # grep pam_wheel.so /etc/pam.d/su auth required pam_wheel.so use_uid Run the following command and verify users in wheel group match site policy: # grep wheel /etc/group wheel:!:10:root,<user list>

조치 방법

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

Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid Create a comma separated list of users in the wheel statement in the /etc/group file: wheel:!:10:root,<user list> /etc is stateless on Container-Optimized OS. Therefore, /etc cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot.

속성

운영 체제
모두
태그
access-controlcontainer-optimized-oscos
참고 자료
CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.5 Ensure access to the su command is restricted