Don't ask why I'm doing it this way but I have to.
Say I have a user name "bob" and he needs to run a program as "monitor." I want to allow "bob" to sudo into the monitor account and run the process. Obviously I could just give "bob" sudo access to run the app but I'm told it has to run as "monitor." Anyways, how can this be done?
Yup, set your sudoers entry like this:
Bob can then run the
COMMAND
undersudo
and it will run as monitor (you can of course useNOPASSWD:
if you want to force a password check).