You can create shell functions or wrapper scripts that run sudo
for you. E.g. put a script like this in your $PATH
(perhaps in $HOME/bin
):
#!/bin/sh
sudo /path/to/tools/salt "$@"
You may want to put the actual binaries somewhere outside the user's PATH
, so they don't get called directly by accident. Then just make the necessary sudo
configurations to allow the user to run /path/to/real/salt
instead.
If you like, you could make a more generic wrapper too, e.g.
#!/bin/sh
sudo "/path/to/tools/${0##*/}" "$@"
It takes the name of program to call from the name it was itself called as, so if called as pepper
or /usr/local/bin/pepper
it would run sudo pepper
, and so on. Then you can symlink the various names to that same script.
To configure salt
to run without a password, you can follow the instructions given here: How to run a specific program as root without a password prompt?.