Linux/Security
[Linux-Security] [CentOS 7] pam_wheel.so 모듈을 이용한 su 명령어 권한 제한
Pydole
2019. 10. 11. 10:48
pam_wheel.so 모듈 : PAM의 주요 모듈 중 하나로 root 권한을 얻을 수 있는 사용자를 wheel 그룹에 묶어서 사용할 수
있도록 지원하는 모듈
/etc/pam.d/su 파일에서 [ auth required pam_wheel.so use_uid 주석해제 ]
# cat /etc/pam.d/su
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
auth required pam_wheel.so use_uid
auth substack system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session include postlogin
session optional pam_xauth.so
/etc/group 파일에서 wheel 소속그룹에 su 로그인을 허용할 계정 추가
# cat /etc/group
wheel:x:10:root,계정1,계정2