bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"su -" strange behaviour on Solaris 9


From: Art Vandalay
Subject: "su -" strange behaviour on Solaris 9
Date: Thu, 6 Oct 2005 19:42:10 -0400

Hi all,
I'm hoping someone can possibly shed some light on some very odd behaviour
I'm seeing.
If I use the stock 'su' that ships with Solaris 9, doing the command "su -"
behaves as per normal. All the root environment variables get setup
properly. Like so:

zoe% ./su -
Password:
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
address@hidden /]# env
HZ=100
LC_MONETARY=en_US.ISO8859-1
SHELL=/sbin/bash
TERM=xterm
LC_NUMERIC=en_US.ISO8859-1
MAIL=/var/mail/root
PATH=/usr/sbin:/usr/bin
LC_MESSAGES=C
LC_COLLATE=en_US.ISO8859-1
PWD=/
TZ=US/Eastern
address@hidden \w]\$
SHLVL=1
HOME=/
LOGNAME=root
LC_CTYPE=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
_=/usr/bin/env

Okay, no problem there. Looks normal. However, if I grab any version of
coreutils and recompile 'su' and use the newly compiled 'su', when I do "su
-" with this new 'su', it doesn't seem to get any of root's profile stuff
sourced properly. The thing I'm most concerned with is $PATH being
incorrect.
Here's an example of it:

zoe% ./su -
Password:
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
address@hidden /]# env
SHELL=/sbin/bash
TERM=xterm
OLDPWD=/
USER=root
PATH=/usr/ucb:/bin:/usr/bin:/etc
PWD=/
address@hidden \w]\$
SHLVL=1
HOME=/
LOGNAME=root
_=/bin/env

The above is using 'coreutils-5.2.1' but i've tried several older versions
and same behaviour.
I realize the version of 'su' on Solaris 9 is far older than 5.2.1, but did
Sun modify 'su', or is their weird interaction with 'su' on Solaris 9 that
i'm not aware of?

If anyone has ideas on *anything* i can try, that would be most appreciated.


Thanks,
J.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]