Solaris 10, su - and PATH

  • Follow


Can someone help verify something for me?

In the past I could (assuming sudoers allows me to do this)...

sudo /usr/bin/ksh
(now I have a root shell)
and then...

su - someuser

and my PATH would be set to the PATH of someuser,
but in Solaris 10 it's like SUPATH is getting
pulled in.. I'm left with just PATH=/usr/bin:
instead of the user's login PATH.

According to the man page (duh.. just stating
this for those who don't know how su
is supposed to behave), you get the
environment of the user when you do an su -
If I did just an su, then I'd expect the
SUPATH behavior.

This looks like a bug to me... but can
somebody else try it out... I can't say
I have latest patches (I will look into planning
that).. so if someone can see if it behaves
correctly, it may be that I simply need
to schedule an update.

Right now it's causing an installation script
to fail.... and the behavior is NOT (IMHO)
what it's supposed to be (especially since
this problem hasn't shown up before).
0
Reply ccox_nopenotthis (295) 9/14/2006 5:21:48 PM

su - [user]	=> you get the user's environment

su [user]	=> you get the PATH from /etc/default/su
		   (/usr/bin: by default)

su 		=> you get the SUPATH from
		   (/usr/sbin:/usr/bin by default)

-- Renaud

Chris Cox wrote:
> Can someone help verify something for me?
> 
> In the past I could (assuming sudoers allows me to do this)...
> 
> sudo /usr/bin/ksh
> (now I have a root shell)
> and then...
> 
> su - someuser
> 
> and my PATH would be set to the PATH of someuser,
> but in Solaris 10 it's like SUPATH is getting
> pulled in.. I'm left with just PATH=/usr/bin:
> instead of the user's login PATH.
> 
> According to the man page (duh.. just stating
> this for those who don't know how su
> is supposed to behave), you get the
> environment of the user when you do an su -
> If I did just an su, then I'd expect the
> SUPATH behavior.
> 
> This looks like a bug to me... but can
> somebody else try it out... I can't say
> I have latest patches (I will look into planning
> that).. so if someone can see if it behaves
> correctly, it may be that I simply need
> to schedule an update.
> 
> Right now it's causing an installation script
> to fail.... and the behavior is NOT (IMHO)
> what it's supposed to be (especially since
> this problem hasn't shown up before).
0
Reply Renaud 9/15/2006 8:38:36 AM


1 Replies
347 Views

(page loaded in 0.105 seconds)

Similiar Articles:













7/24/2012 6:33:47 AM


Reply: