su 명령 제한하기 tip/APM2008/07/01 17:55
일반사용자들이 수퍼유저계정으로 변경을 하려면 su라는 명령어를 쓰게된다.
만약 su명령을 몇몇 사람들에게만 쓸수 있게 하려한다면 다음과 같이하면 된다. ]# vi /etc/pam.d/su
#%PAM-1.0auth sufficient /lib/security/pam_rootok.so# Uncomment the following line to implicitly trust users in the "wheel" group.#auth sufficient /lib/security/pam_wheel.so trust use_uid# Uncomment the following line to require a user to be in the "wheel" group.#auth required /lib/security/pam_wheel.so use_uid => 주석을 제거한다.
auth required /lib/security/pam_stack.so service=system-authaccount required /lib/security/pam_stack.so service=system-authpassword required /lib/security/pam_stack.so service=system-authsession required /lib/security/pam_stack.so service=system-authsession optional /lib/security/pam_xauth.so
위 설정은 wheel 그룹에 속한 사용자들만이 su 명령을
쓸수 있다는 것을 말한다.
wheel은 이러한 목적으로 사용될 수 있는 특별한 계정이다. 따라서 wheel 이외의 그룹은 위와같이 사용될 수없다.
위 설정에서 wheel 그룹에 속한 사람만이 su 명령을 사용할 수있게 했으므로 su 명령을 써야하는 계정이 있다면 wheel 그룹에 추가시켜 주어야한다. 만약 in4mania 라는 계정을 wheel 그룹으로 추가하려면 다음과 같이한다.
다음 명령에서 G는 그룹을 나타내며, 10은 wheel 에 해당하는 값이다.
]# usermod -G10 in4mania
출처 –리눅스베이
'tip > APM' 카테고리의 다른 글
| 404 에러페이지를 내 맘대로 (0) | 2009/04/17 |
|---|---|
| APM운영시 사이트가 느려질때 점검사항 (0) | 2009/03/11 |
| VMware와 인터넷 공유하기 (0) | 2009/02/23 |
| 리눅스 최적화 및 보안지침 (1) | 2008/07/05 |
| FTP Active 모드와 Passive 모드의 차이점 (1) | 2008/07/01 |
| su 명령 제한하기 (0) | 2008/07/01 |
| Unix/Linux 시스템 분석 (0) | 2008/07/01 |
| [DNS] 2차 도메인 설정하기 (0) | 2008/07/01 |
| [DNS] 추가 도메인 설정하기 (0) | 2008/07/01 |
| [DNS] 네임서버 설정 검사하기 (0) | 2008/07/01 |
| tar명령 사용법 (0) | 2008/07/01 |
