블로그 이미지
은총애비!!

카테고리

분류 전체보기 (2525)
Linux (35)
Error 해결 방법 (5)
소소한 일상 (1620)
사진실 (0)
책책책, 책을 읽읍시다!! (21)
기타(JSP & DB & 등등) (4)
미국 주식 관련 (541)
아침형 인간 프로젝트 (292)
Total
Today
Yesterday

'명령어'에 해당되는 글 1건

  1. 2014.09.19 [Micro Server G7 N54L] su 명령어 제한
반응형

[Micro Server G7 N54L] su 명령어 제한

 

su 명령을 사용할 수 있는 계정을 정해서 그 계정만 su 명령을 사용 할 수 있도록 제한

 

모든 사용자는 su 명령으로 root 권한으로 변경 할 수 있습니다.

이러한 최고 권한 root로 가는 것을 제한 하는 방법 입니다.

 

vi /etc/pam.d/su 파일에 2줄 추가합니다.

auth        sufficient        /lib/security/$ISA/pam_rootok.so

auth        sufficient        /lib/security/$ISA/pam_wheel.so group=sugroup

#%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            include         system-auth
account         sufficient      pam_succeed_if.so uid = 0 use_uid quiet
account         include         system-auth
password        include         system-auth
session         include         system-auth
session         optional        pam_xauth.so

 

group=sugroup 에 group에 sugroup에 포함된 사용자만 su 명령을 수행 할 수 있습니다.

그외 사용자는 아래와 같이 su 명령에 정상적인 암호를 넣어도 제한 됩니다.

bash-4.0$ su
암호:
su: incorrect password
bash-4.0$


 

반응형
Posted by 은총애비!!
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함