1. /etc/pam.d/su 파일 수정(pam 모듈 미사용시 2번부터)
-아래와 같이 7번째 "#auth required pam_wheel.so use_uid"에서 #부분 삭제
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@localhost ~]# 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
|
cs |
2.wheel 그룹에 계정 추가
#usermod -G wheel [계정명]
1
|
[root@localhost ~]# chgrp wheel /bin/su
|
cs |
5.su 파일 권한 변경 및 확인
1
2
3
|
[root@localhost ~]# chmod 4750 /bin/su
[root@localhost ~]# ls -al /bin/su
-rwsr-x---. 1 root wheel 32208 Oct 31 2018 /bin/su
|
cs |
끝.
'Linux' 카테고리의 다른 글
vim 사소한 팁 (0) | 2022.02.03 |
---|---|
CentOS 7 +python3 web crawling 순서 (0) | 2021.10.16 |
CentOS 7.x SSH root 접속 제한(sshd_config) (0) | 2021.07.13 |
Centos7 ifconfig 안될 경우 (0) | 2019.12.19 |