小编Ϲοδ*_*διϲ的帖子

符号链接和 sudo 可执行文件

如果我有以下 sudoers 条目

usera ALL=(userb) NOPASSWD: /home/userc/bin/executable-file
usera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-file
Run Code Online (Sandbox Code Playgroud)

当我以 usera 身份登录并尝试运行以下命令时,它可以工作

sudo -u userb /home/userc/bin/executable-file
Run Code Online (Sandbox Code Playgroud)

不是下面的那个。

sudo -u userb /home/userc/bin/link-to-another-executable-file

Sorry, user usera is not allowed to execute '/home/userc/bin/link-to-another-executable-file' as userb on hostname.
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

linux centos sudo symbolic-link command-line

4
推荐指数
1
解决办法
6197
查看次数

标签 统计

centos ×1

command-line ×1

linux ×1

sudo ×1

symbolic-link ×1