[sudo-users] Passing environment variables
Paul Pianta
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 :/
Thanks
pantz
-----Original Message-----
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
Hi All
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 =
/dp00/u02/app/oracle/local/teamdba/tools/scripts/spbuilder/createDatabas
eBuild.sh
rsoft ALL = (oracle) NOPASSWD: ORACLE_CREATE_DB
Here are the permissions on the script ...
[root at qcdvcn04 rootasp]# ll
/dp00/u02/app/oracle/local/teamdba/tools/scripts/spbuilder/createDatabas
eBuild.sh
-rwxr-xr-x 1 oracle dba 468 Dec 18 15:40
/dp00/u02/app/oracle/local/teamdba/tools/scripts/spbuilder/createDatabas
eBuild.sh
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?
Thanks
pantz
____________________________________________________________
sudo-users mailing list <sudo-users at sudo.ws> For list information,
options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users
More information about the sudo-users
mailing list