Another approach would be to make an ssh connection to root@localhost using an ssh key that is authorised for the purpose, and limited to only do the required things.
In the /root/.ssh/authorised_keys file, you can put a lot of fancy configuration against they key to only allow certain commands to be run, and only accept connections from certain machines.
On the command issuing side, the ssh key need not have a pass phrase, because what it can be used for as root will be very strictly limited. It will be impossible to use it to get a shell for example.
In reply to Re: Automating sudo actions
by chrestomanci
in thread Automating sudo actions
by rastoboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |