8.0 changes behavior of "who am i"
Charles Owens
cowens at greatbaysoftware.com
Thu Jan 7 22:51:08 UTC 2010
An observation... pre-8.0, "who am i" always returned the owner of the
terminal device, regardless what you might have done with with "su".
With 8.0, it returns the id of the user you've changed to. Example:
### 7.1 system
[cowens at jakob ~]$ who am i
cowens ttyp0 Jan 6 07:31 (169.254.222.1)
[cowens at jakob ~]$ su
Password:
[root at jakob /home/cowens]# who am i
cowens ttyp0 Jan 6 07:31 (169.254.222.1)
### 8.0 system
[cowens at newercastle ~]$ who am i
cowens 0 Jan 7 17:47
[cowens at newercastle ~]$ su
[root at newercastle /home/cowens]# who am i
root 0 Jan 7 17:47
The alternative syntax ("who -m") gives same result. The who(1) man
page still states that both forms are supposed to give info about the
"terminal attached to standard input," which, if I look with "w", it
looks as I'd expect:
[root at newercastle /home/cowens]# w
5:47PM up 1 day, 1 min, 2 users, load averages: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE WHAT
root v0 - 17Dec09 21days -bash (bash)
cowens pts/0 169.254.222.1 5:47PM - w
Am I missing something, or do we have a bug here? (I looked but can't
find any existing threads about this issue). I'm guessing that the
symptom here results somehow from the introduction of pts(4).
Tnx
--
Charles Owens
Great Bay Software, Inc.
More information about the freebsd-stable
mailing list