Subject: RE: w program weird output
To: 'port-vax@netbsd.org' <port-vax@netbsd.org>
From: Andrew Sporner <andy.sporner@networkengines.com>
List: port-vax
Date: 10/10/2000 10:25:40
Hi,
> Hello all.
> Look at this tranbge thing:
>
> knuth [11:15am]{rj45}[~]> ssh rj45@mariah
> rj45@mariah's password:
> Last login: Tue Oct 10 11:12:41 2000 from knuth.fi.infn.it
> NetBSD 1.5_ALPHA2 (GENERIC) #1: Tue Sep 12 09:14:10 PDT 2000
>
> Welcome to NetBSD!
>
> mariah [11:14am]{rj45}[~]> whoami
> rj45
> mariah [11:15am]{rj45}[~]> w
> 11:15AM up 20:08, 1 user, load averages: 0.15, 0.14, 0.09
> USER TTY FROM LOGIN@ IDLE WHAT
> root p0 knuth 11:14AM 0 w
>
>
> I am not root but user rj45
>
> rj45:i19U9nAN7BNRw:1004:20::0:0::/home/rj45:/usr/pkg/bin/tcsh
>
> but the w program duisplays me as root.
>
> how come ??
Because W is using the raw UTMP file to display the users,
where 'whoami' is using the effective user id. I would try
the same exercise with standard 'telnet' and see if you see
the same thing. If not, my guess is that 'sshd' is not
doing 'the right thing'.
Andy