[sudo-users] Using an environment variable in sudoers?
leam hall
leamhall at gmail.com
Tue Oct 18 07:48:23 MDT 2016
Working through the things I've been asked to do. Most of them seem okay so
far, but still stuck on using an environment variable in a sudoers file.
What I'm looking for is to be able to put "$LEAM_PATH/my_command.sh" in
suders. I've tried to add the following to /etc/sudoers.d/my_commands but
get a syntax error.
Defaults env_keep += "LEAM_PATH"
leam ALL = $LEAM_PATH/my_command.sh
While importing an environment variable carries risk, is there any wayto do
this?
Thanks!
Leam
--
Mind on a Mission <http://leamhall.blogspot.com/>
More information about the sudo-users
mailing list