Subject: Re: Bug#1080330: coreutils: who no longer works

From: Chris Hofstaedtler <[email-masked]>
Date: Sun, 16 Feb 2025 23:56:43 +0100

* Michael Stone <[email-masked]> [250216 22:45]:
> On Sun, Feb 16, 2025 at 07:05:13PM +0100, Vincent Lefevre wrote:
> > No, w(1) is broken (at least in sid). See the difference between
> > "who" and "w" with systemd 256.7-1, i.e. before the upgrade of
> > systemd that removed utmp support:
> 
> That's because someone decided to suddenly remove an interface which has
> been used for decades without any kind of transition plan or replacement.

Clearly there is a replacement, because the data is there:

  % w
  23:53:23 up 1 min,  2 users,  load average: 0.06, 0.03, 0.00
  USER     TTY      FROM             LOGIN@   IDLE   JCPU PCPU WHAT
  ch                192.168.64.1     23:53    1:24 0.00s  0.02s sshd-session: ch [priv]
  ch                -                23:53    1:24 0.00s  0.04s /usr/lib/systemd/systemd --user

  % loginctl
  SESSION  UID USER SEAT LEADER CLASS   TTY IDLE SINCE
  1 1000 ch   -    601    user    -   no   -
  2 1000 ch   -    606    manager -   no   -
  
  2 sessions listed.

But who:

  % who
  %

Chris

PS: Lack of tty in the list is IIRC some problem with openssh not
passing the TTY to PAM, but this is a separate thing.