[sudo-users] set environment for call in sudo.

Peter Volkov pvolkov at mics.msu.su
Sat Nov 11 13:22:27 EST 2006


Hello.

sudo for security drops all env variables except that mentioned in man
page. But I need to call program in the predefined environment.
Searching mailing list I found solution to use wrapper script:

#!/bin/bash
export MYENVVAR="value"
/path/to/program

And to call this script from sudo. But is it possible to do the same
straight from the sudoers?

Thank you for your time,
Peter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/sudo-users/attachments/20061111/13d143eb/attachment.bin>


More information about the sudo-users mailing list