[sudo-users] Passing environment variables
ppianta at taleo.com
Tue Dec 19 11:37:11 EST 2006
It's ok now - I didn't realise that I needed to run sudo with the '-u
oracle' option :/
From: sudo-users-bounces at courtesan.com
[mailto:sudo-users-bounces at courtesan.com] On Behalf Of Paul Pianta
Sent: December 19, 2006 9:38 AM
To: sudo-users at sudo.ws
Subject: [sudo-users] Passing environment variables
With sudo, I am trying to run a script as another user (a non-root user)
but I am having trouble with the environment variables.
Here is what I am using in my sudoers file ...
Cmnd_Alias ORACLE_CREATE_DB =
rsoft ALL = (oracle) NOPASSWD: ORACLE_CREATE_DB
Here are the permissions on the script ...
[root at qcdvcn04 rootasp]# ll
-rwxr-xr-x 1 oracle dba 468 Dec 18 15:40
Hopefully what I have in my sudoers file means that the user 'rsoft' can
run the command above, as the user 'oracle' with no password. Ideally, I
would like the environment variables, when running the script, to be
those of the 'oracle' user, rather than the 'rsoft' user.
Is there any way to do this?
sudo-users mailing list <sudo-users at sudo.ws> For list information,
options, or to unsubscribe, visit:
More information about the sudo-users