IA/System Admin

Solaris10에서 wheel 그룹으로 su 실행 제한하기

kiostory 2018. 11. 7. 22:28

* /etc/pam.d/su 솔라리스에 있는지 먼저 확인.리눅스에는 있음

* http://www.pilotlogic.com/sitejoom/index.php/97-wiki/installation/solaris-install/217-solaris-add-a-user-to-sudo-list 검토해볼것

----------------------------------------------------------------------------------------------------------



솔라리는 리눅스처럼 wheel그룹에서만 su를 사용할수 있게 제한할 수 있는

기능은 없다 그러나, 다음처럼 설정을 하면 된다.


우선, wheel이라는 그룹을 생성한다.

--------------------------------------------------------------

18 sol-root:/>% groupadd wheel

--------------------------------------------------------------


su를 사용할 수 있는 유저를 usermod를 이용하여 wheel그룹에 추가한다.

--------------------------------------------------------------

19 sol-root:/>% usermod -G wheel userid

--------------------------------------------------------------


su 명령어 그룹변경 및 퍼미션 변경

--------------------------------------------------------------

20 sol-root:/>% chgrp wheel /usr/bin/su

21 sol-root:/>% chgrp wheel /usr/local/bin/su

22 sol-root:/>% chmod 4750 /usr/bin/su

22 sol-root:/>% chmod 4750 /usr/local/bin/su

--------------------------------------------------------------


위처럼 설정을 변경하면 wheel이라는 구룹에 속한 유저만 su를 실행할 수 있다.


ps) pam_wheel이라는 소스를 구해서 설치해도 된다.




출처: http://kunta.tistory.com/entry/Solaris10에서-wheel-그룹으로-su-실행-제한하기 [쿤타의 쉼터]