00.OS
sudoers 명령어 인자까지 제한
왕영주
2020. 8. 27. 21:56
cat /etc/sudoers
test 계정이 root 계정을 통해 httpd 서비스 start 가능
test ALL=(root) /usr/bin/systemctl start httpd
test 그룹이 root 계정을 통해 모든 서비스 start 가능
%test ALL=(root) /usr/bin/systemctl start *
test 계정이 root 계정을 통해 httpd 서비스 start, vsftpd 서비스 stop 가능
test ALL=(root) /usr/bin/systemctl start httpd, /usr/bin/systemctl stop vsftpd
test 그룹이 root 계정을 통해 모든 서비스 start, 모든 서비스 stop 가능
%test ALL=(root) /usr/bin/systemctl start *, /usr/bin/systemctl stop *
반응형