0
我想阻止用户在任何地方使用“sudo rm
”表单。
我已经编辑sudoers
:Sudoers无法阻止命令从bash shell脚本执行
管理员组的成员可能获得root权限
%admin ALL=(ALL) ALL,!/bin/rm
和确定:
[email protected]:~$ sudo rm
Sorry, user derek is not allowed to execute '/bin/rm' as root on derek-desktop.
但我创建了一个test.sh用rm命令
[email protected]:~$ cat test.sh
rm --help
它给我看rm的帮助。 似乎sudoers
无法防止此行为。我想从sudo
中禁用所有运行rm的用户。
你能帮我吗?提前致谢!