[sudo-users] Setting environment variables

Markus Moeller huaraz at moeller.plus.com
Mon Sep 15 11:32:58 EDT 2008


Is there a way to set environment variables in sudoers ?  I need to set an
library path with LD_LIBRARY_PATH but I don't want to take the users set
variable with env_keep. Is there a sudoers command which can set a environment
variable per command ?
e.g. 

Env_alias     ENV1 = LD_LIBRARY_PATH=/opt/app1/lib;PATH=/opt/app1/bin

OPERATORS     ALL = ENV1: ALL


Markus




More information about the sudo-users mailing list