|
|
Solaris 10, su - and PATH
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: Solaris 8 /bin/su problem - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris Solaris 8 /bin/su problem - comp.unix.solaris Solaris 10, su - and PATH - comp.unix.solaris... environment su [user] => you ... For solaris-10, what are YOUR MANPATH and PATH? (THANKS!) - comp ...Solaris 10, su - and PATH - comp.unix.solaris Solaris 10 MANPATH - comp.unix.solaris Solaris 10, su - and PATH - comp.unix.solaris For solaris-10, what are YOUR MANPATH ... What path to use for non-default Java versions? - comp.unix ...Solaris 10, su - and PATH - comp.unix.solaris That seems reasonable. In my searches, I notice ... Solaris 10, su - and PATH - comp.unix.solaris What path to use for non ... vxdisk sees only one path - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris vxdisk sees only one path - comp.unix.solaris Solaris 10, su - and PATH - comp.unix.solaris vxdisk sees only one path - comp ... can't get real path - comp.unix.solarisAutomating the Software Installation using Shell script - comp ... can't get real path - comp.unix.solaris Automating the Software Installation using Shell script - comp ... Solaris 10 MANPATH - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris For solaris-10, what are YOUR MANPATH and PATH? (THANKS!) - comp ... That seems reasonable. In my searches, I notice ... nslookup on solaris 10 - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris nslookup on solaris 10 - comp.unix.solaris Solaris 10, su - and PATH - comp.unix.solaris nslookup on solaris 10 - comp.unix ... su problems? - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris Hi, Firstly i'm using Solaris 10 on an x86 platform. I need to create two ... Restricting Solaris SU access; su problem; SU ... su and the ksh .profile - comp.sys.sun.adminSolaris 10, su - and PATH - comp.unix.solaris sudo /usr/bin/ksh (now I have a root shell) and then... su - someuser and my PATH would be set to the ... Solaris 10? /etc ... 10_Recommended Patches with Veritas - comp.unix.solarisSolaris 10, su - and PATH - comp.unix.solaris 10_Recommended Patches with Veritas - comp.unix.solaris Solaris 10, su - and PATH - comp.unix.solaris > I have latest patches ... Re: Solaris 10, su - and PATH - Der Keiler UNIX: The source for ...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 Modifying the PATH environment variable on Solaris 10I'm trying to create a profile that the shell sh should execute when I log in or su as root. Basically I'd like to add the capability to execute 7/24/2012 6:33:47 AM
|
|
|
|
|
|
|
|
|