如果我有以下 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)
有任何想法吗?