[SUMMARY] USER environment variable get set, but how?

From: Michael Wang (mwang@tech.cicg.ml.com)
Date: Thu Nov 11 1999 - 10:26:19 CST


(1) Summary of the problems:

When USER environment variable is not setup, and if you login as
user a, then after you telnet to the same box or another box as
user b, then the USER is set to b. How it is get set?

(2) Summary of answers:

    telnet man page says:

     -l user
          When connecting to a remote system that understands the
          ENVIRON option, then user will be sent to the remote
          system as the value for the variable USER.

    It is close but not exactly what happened. if USER is not set before
    telnet, it will be set after telnet. And this happens without "-l user"
    option. And it seems there is no control over it.

    The reason I ask the question is if USER is set for example as root,
    and you install Oracle as oracle user, then the installation will fail.
    This is because Oracle installer tries to do "chown $USER <file>"
    a bug on Oracle part but can be prevented by unset USER.

(3) Thanks:

Jonathan.Loh@bankofamerica.com
Danny Johnson <djohnson@nbserv1.rsc.raytheon.com>
Unixboy@aol.com
Arthur Darren Dunham <add@netcom.com>
Roger Fujii <rmf@lookhere.com>
"McIntire, John" <john_mcintire@ti.com>
Brian Scanlan <singer@redbrick.dcu.ie>
Vance Fields <Vance.Fields@wdr.com>

(4) Procedure reproduce the problem:

# uname -a
SunOS pizza 5.5.1 Generic sun4m sparc SUNW,SPARCstation-20
# echo $USER
 
# telnet .
Trying 0.0.0.0...
Connected to ..
Escape character is '^]'.

UNIX(r) System V Release 4.0 (pizza)

login: root
Password:
Last login: Fri Nov 5 16:33:34 from localhost
Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996
You have new mail.
[pizza][16:34][/]echo $USER
root
[pizza][16:34][/]telnet .
Trying 0.0.0.0...
Connected to ..
Escape character is '^]'.

UNIX(r) System V Release 4.0 (pizza)
 
login: root
Password:
Last login: Fri Nov 5 16:34:12 from localhost
Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996
You have new mail.
[pizza][16:34][/]echo $USER
 
[pizza][16:34][/]telnet .
Trying 0.0.0.0...
Connected to ..
Escape character is '^]'.
 
 
UNIX(r) System V Release 4.0 (pizza)
 
login: root
Password:
Last login: Fri Nov 5 16:34:26 from localhost
Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996
You have new mail.
[pizza][16:34][/]echo $USER
root



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:32 CDT