If I have the below sudoers entry
usera ALL=(userb) NOPASSWD: /home/userc/bin/executable-file usera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-file
When I log-on as usera and try running the below commands, it works
sudo -u userb /home/userc/bin/executable-file
but NOT the one below.
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.