"who" (coreutils 9.1-1) is broken

Since the 2022.06.12 update to Manjaro Stable, the who command only outputs the — in my case — Plasma/X11 session running on tty1, but it no longer shows any of the open terminal emulator sessions, e.g. pts/0, pts/1, et al.

$ who
fh       tty1         2022-06-13 06:18 (:0)
fh       pts/2        2022-06-13 13:52 (:0)
$ who --version
who (GNU coreutils) 9.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Joseph Arceneaux, David MacKenzie, and Michael Stone.
$ inxi -Sxxx
System:
  Host: tiger Kernel: 5.18.3-1-MANJARO arch: x86_64 bits: 64 compiler: gcc
    v: 12.1.0 Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.4 wm: kwin_x11 vt: 1
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
1 Like

Hm, mine doesn’t mention much either:

[strit@odin ~]$ who
strit    tty2         2022-06-13 07:21
[strit@odin ~]$ who --version
who (GNU coreutils) 9.1
Copyright © 2022 Free Software Foundation, Inc.
Licens GPLv3+: GNU GPL version 3 eller nyere <https://gnu.org/licenses/gpl.html>.
Dette er frit programmel: du kan frit ændre og videredistribuere det.
Der gives INGEN GARANTI, i den grad som loven tillader dette.

Skrevet af Joseph Arceneaux, David MacKenzie, og Michael Stone.
1 Like
[nx-74205:/dev/pts/4][/home/aragorn]
[aragorn] >  who --version
who (GNU coreutils) 9.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Joseph Arceneaux, David MacKenzie, and Michael Stone.

[nx-74205:/dev/pts/4][/home/aragorn]
[aragorn] >  who
aragorn  tty1         2022-06-13 13:00 (:0)

[nx-74205:/dev/pts/4][/home/aragorn]
[aragorn] > 

This is what it used to report — below the screenfetch output. :arrow_down:

There was an update to libutempter recently.
I bet permissions on /usr/lib/utempter/utempter are messed up.

ls -l /usr/lib/utempter/utempter

2 Likes

Bingo! :arrow_down:

[nx-74205:/dev/pts/4][/home/aragorn]
[aragorn] >  ls -l /usr/lib/utempter/utempter
-rwxr-sr-x 1 root kmem 14168 Jun  2 22:12 /usr/lib/utempter/utempter

And when I look at yesterday’s timeshift backup… :arrow_down:

[nx-74205:/dev/pts/4][/root] # ls -l /mnt/timeshift/snapshots/2022-06-12_17-57-00/localhost/usr/lib/utempter/
total 16
-rwxr-sr-x 1 root utmp 14088 Jul  7  2020 utempter

So the problem is probably with the filesystem package. :thinking:

1 Like

The thing is that in the libutempter PKGBUILD, there is:

chown root:utmp "$pkgdir/usr/lib/utempter/utempter"

Now the utmp group could have a different GID on the system where it’s built/packaged than on the system where the package is installed. Hence it might have a different group assigned.

There is actually a bug report at Arch as well as a fix, but apparently it was not yet merged. FS#58306 : [libutempter] GID of group utmp auto-assigned via sysusers.d breaks functionality

To get it fixed you can do:

sudo chgrp utmp /usr/lib/utempter/utempter
sudo chmod g+s /usr/lib/utempter/utempter
3 Likes

Yep, did that already. :wink:

2 Likes

Update


It’s still broken, though… :arrow_down:

aragorn  tty1         2022-06-13 13:00 (:0)
aragorn  pts/4        2022-06-13 17:10 (:0)
aragorn  pts/2        2022-06-13 17:10 (:0)

What it should be showing is… :arrow_down:

tty1   - the GUI session
pts/0  - Yakuake
pts/1  - Konsole
pts/2 -  Konsole

However, the Yakuake session is now at pts/1 instead of pts/0, and it’s not showing in the output, plus that the count also jumps from pts/2 for the first Konsole session to pts/4 for the second Konsole session — there is no pts/3.

:astonished:

Even after reboot?

I haven’t rebooted yet. I don’t reboot very often, and I don’t shut off (or hibernate) my system at the end of the day.

Update

Okay, I have now rebooted, and the output appears normal again. :man_shrugging:

The pts sessions are written to /var/run/utmp only when you start a terminal.
You probably had those running before you fixed the permissions? Those would not be showing up…

1 Like

Correct. I was fixing the permissions from within a Konsole session, and Yakuake is started automatically at Plasma login time. :wink:

It is now with libutempter 1.2.1-3.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.