- or download this
root@mybox:/tmp/fakebin
# ls -ld .
...
print "Secret command output.\n";
exit 0;
- or download this
bob ALL = (sexec) NOPASSWD: /tmp/fakebin/cmd.pl
- or download this
bob@mybox:~
...
$ sudo -u sexec /bin/cat /tmp/fakebin/cmd.pl
Password:
Sorry, user bob is not allowed to execute '/bin/cat /tmp/fakebin/cmd.p
+l' as sexec on mybox.localdomain.tld.