0
  1. If I'm on a desktop 22.04 system, and open a terminal, who, w, and last -f /var/run/utmp all report that nobody is logged in.
  2. If I sudo those 3 commands they all report that I'm logged in.
  3. If I ssh to a remote 22.04 system, these 3 commands correctly report anyone connected over ssh, whether or not the commands are sudo'ed.

So what's the story here? There's nothing in the man pages about this, and man who unhelpfully states that "The who utility shall list various pieces of information about accessible users. The domain of accessibility is implementation-defined."

2
  • 1
    does this resource help explain in more detail?
    – graham
    Commented Jun 5 at 9:43
  • 1
    @graham: actually, yes, it did - it makes me realise that the last part of my question doesn't really make sense, since it doesn't include anyone logged in on a control terminal/tty0/etc. So I've deleted it. Thanks.
    – QF0
    Commented Jun 5 at 10:06

0

You must log in to answer this question.

Browse other questions tagged .