[sudo-users] Using an environment variable in sudoers?
leamhall at gmail.com
Tue Oct 18 08:14:51 MDT 2016
On Tue, Oct 18, 2016 at 9:57 AM, Shawn McMahon <syberghost at gmail.com> wrote:
> On Tue, Oct 18, 2016 at 8:48 AM, leam hall <leamhall at gmail.com> wrote:
> > Working through the things I've been asked to do. Most of them seem okay
> > 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
> A completely equivalent rule would be:
> leam ALL = ALL
Are you saying that because of the ability to reset the environment
variable? I don't disagree, but wasn't sure if there's another option.
Mind on a Mission <http://leamhall.blogspot.com/>
More information about the sudo-users