当前位置: 代码迷 >> 综合 >> sudo限制特定指令
  详细解决方案

sudo限制特定指令

热度:67   发布时间:2024-02-02 02:18:23.0

编辑sudoer文件,多个指令可以用','隔开

# cat /etc/sudoers

## Allow root to run any commands anywhere 
root    ALL=(ALL)     ALL
test ALL=(ALL)       NOPASSWD: /usr/local/nginx/sbin/nginx