sudo version 1.6.7p5 : using -H -u options on Solaris 8

From: David Stapleton (nefarus@hotmail.com)
Date: Mon Dec 15 2003 - 10:33:17 EST


Hi all,

It's been a while since playing around with this stuff but I have an issue
with sudo not setting the $HOME variables of the target user.

For example, Assuming I am user X with a $HOME variable set to /users/X, I
want to use sudo to run an Oracle command as the user oracle, so I use the
following syntax :

$ sudo -H -u oracle echo $HOME

What, perhaps in my ignorance, I would expect to see from the above command
would be the $HOME variable of oracle, i.e. /users/oracle BUT I still see
the $HOME variable of user X, /users/X.

I thought that the -H option in sudo sets the $HOME variable to the homedir
of the target user, oracle in this example.

My issue is really around the fact that I cannot use oracle in this way
because sudo does not appear to be able to take the oracle variables such as
$ORACLE_HOME, $ORACLE_SID, etc. (again, perhaps in my ignorance).

Is there an issue with this or am I mis-reading the sudo MAN page?

If an issue, a work around would be good but a final solution would be
better.

Thanking you in advance.

David S.

P.S. I have read the archives and cannot find an exact match for this
problem other than the solution of using the -H option OR hardcoding
something in the sudoers file "defaults always_set_home", which doesn't seem
to work either.....

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:27:41 EDT