2013년 12월 2일 월요일

[Linux] su 명령 제한하기

일반사용자들이 수퍼유저계정으로 변경을 하려면 su라는 명령어를 쓰게된다. 만약 su명령을 몇몇 사람들에게만 쓸수 있게 하려한다면 다음과 같이하면 된다.

]# vi /etc/pam.d/su
#%PAM-1.0
auth       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-auth
account    required     /lib/security/pam_stack.so service=system-auth
password   required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_stack.so service=system-auth
session    optional     /lib/security/pam_xauth.so

위 설정은 wheel 그룹에 속한 사용자들만이 su 명령을 쓸수 있다는 것을 말한다. wheel은 이러한 목적으로 사용될 수 있는 특별한 계정이다. 따라서 wheel 이외의 그룹은 위와같이 사용될 수없다.

위 설정에서 wheel 그룹에 속한 사람만이 su 명령을 사용할 수있게 했으므로 su 명령을 써야하는 계정이 있다면 wheel 그룹에 추가시켜 주어야한다. 만약 in4mania 라는 계정을 wheel 그룹으로 추가하려면 다음과 같이한다.

다음 명령에서 G는 그룹을 나타내며, 10은 wheel 에 해당하는 값이다.

# usermod -G10 in4mania

홈페이지 jQuery 라이브러리에서 CVE-2019-11358 취약점 패치 여부 확인 방법

현재 홈페이지에서 사용 중인 jQuery 라이브러리가 CVE-2019-11358 취약점 패치를 적용했는지 확인하는 방법은 다음과 같습니다. 1. jQuery 버전 확인 홈페이지 소스 코드를 확인하여 jQuery 라이브러리 버전을 직접 확인합니다. 웹 ...