From: "Davis, Alan" <Davis () tessco ! com>
To: tru64-unix-managers
Subject: Change in v5.x LOGNAME shell variable and su
Date: Fri, 30 Mar 2001 14:49:59 +0000 [thread overview]
Message-ID: <98596383823703.tru64-unix-managers.marc@archive.invalid> (raw)
Some of my scripts written under v4.x use both LOGNAME and USER variables.
Under v5.x some of the scripts are failing due to an apparent difference in
the way that su modifies the environment. Has anyone else run into this?
Under v5.x the LOGNAME variable isn't set to the effective username after an
su, it stays the original username. Here's an example :
v4.0e :
$ env | grep LOGNAME
LOGNAME=davis
$ env | grep USER
USER=davis
$ su - sysdavis
Password:
# env | grep LOGNAME
LOGNAME=sysdavis
# env | grep USER
USER=sysdavis
v5.1 :
$ env | grep LOGNAME
LOGNAME=davis
$ env | grep USER
USER=davis
$ su - sysdavis
Password:
# env | grep LOGNAME
LOGNAME=davis
# env | grep USER
USER=sysdavis
The manpage for su has been modified, but it doesn't accurately describe the
effect of su on the LOGNAME variable.
Alan Davis
davis@tessco.com
reply other threads:[~2001-03-30 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox