"who" command is not listing the users
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Release Notes for Ubuntu |
Fix Released
|
Undecided
|
Unassigned | |||
The Ubuntu-power-systems project |
Fix Released
|
Low
|
Ubuntu on IBM Power Systems Bug Triage | |||
coreutils (Debian) |
Fix Released
|
Unknown
|
||||
coreutils (Ubuntu) | Status tracked in Questing | |||||
Plucky |
Fix Released
|
Undecided
|
Unassigned | |||
Questing |
Fix Released
|
Undecided
|
Unassigned | |||
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | |||
Plucky |
Won't Fix
|
Undecided
|
Unassigned | |||
Questing |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
------------------
[ Impact ]
* The small but well known and popular tool 'who',
included in the coreutils package,
is not built in the correct way in Ubuntu 25.04,
hence does not work properly
and just prints nothing when executed on 25.04.
* In Ubuntu, systemd is no longer built with utmp support.
Among other things, this means that systemd’s default
/usr/
* To solve this situation coreutils needs to be build
with '--enable-systemd' in dh_auto_configure
and also requires libsystemd-dev as Build-Depends.
[ Test Plan ]
* Install a plain Ubuntu 25.04 on any supported architecture,
since this bug was first opened on ppc64el,
ideally test this on ppc64el as well.
* Verify the default coreutils package version with
$ apt-cache policy coreutils
It should report: Installed: 9.5-1ubuntu1
* Just type and execute 'who' to recreate the error situation:
$ who
$
* Now install the modified package
(from proposed, here in this example from my PPA)
and verify that it is the currently installed package:
$ apt-cache policy coreutils
It should report the new version, like "Installed: 9.5-1ubuntu1.1"
* Now 'who' should work fine again and prints an output similar to:
$ who
ubuntu sshd pts/0 2025-04-24 08:51 (10.xxx.xxx.xxx)
* Since building with '--enable-systemd' has also an affect on
the pinky, users, and uptime binaries (because all call read_utmp()
as well), it's reasonable to test these on top:
* executing 'pinky ubuntu' with package 9.5-1ubuntu1 leads to:
$ pinky ubuntu
Login Name TTY Idle When Where
but with the modified package:
$ pinky ubuntu
Login Name TTY Idle When Where
ubuntu ubuntu sshd pts/0 2025-04-25 16:24 10.xxx.xxx.xxx
* executing 'users' with package 9.5-1ubuntu1 leads to:
$ users
$
but with the modified package:
$ users
ubuntu
* executing 'uptime' with package 9.5-1ubuntu1 leads to:
$ uptime
16:40:23 up 9 days, 4:11, 2 users, load average: 0.00, 0.00, 0.00
and with the modified package:
$ uptime
16:40:52 up 9 days, 4:10, 2 users, load average: 0.00, 0.00, 0.00
(so uptime was actually not affected)
[ Where problems could occur ]
* Due to the previous entry in the Release Notes,
one may think that this is not going to be fixed in 25.04
and might already have accepted ot worked around this.
* The new Build-Depends might have been forgotten,
in this case the above test would not lead to a working
package and 'who' command.
* Adding '--enable-systemd' could lead to unforeseen changes in behavior,
but this is very unlikely. Autopkgtests may help to verify.
* Since the code itself stays unchanged and only package meta data
gets modified, there are barely more problems that may occur.
[ Other Info ]
* A test build was done in PPA (for all architectures we support)
and is available here:
https:/
* The test package was successfully verified
(like described in the Test Plan above).
* Since the development of the Q release ('Questing') was just opened,
this might need to be uploaded to 'Questing' first before
we can SRU to Plucky/25.04.
__________
== Comment: #0 - Kowshik Jois B S <email address hidden> - 2025-03-17 09:06:44 ==
---Problem Description---
"who" command is not listing the users.
---Steps to Reproduce---
1. Install Ubuntu25.04 on a PowerVM LPAR
2. Execute "who" command
---uname output---
Linux ubhost2504 6.14.0-10-generic #10-Ubuntu SMP Wed Mar 12 16:05:46 UTC 2025 ppc64le ppc64le ppc64le GNU/Linux
root@ubhost2504:~# ls /run/utmp
ls: cannot access '/run/utmp': No such file or directory
Additional details:
root@ubhost2504:~# systemctl restart systemd-
root@ubhost2504:~# sleep 5
root@ubhost2504:~# ls /run/utmp
ls: cannot access '/run/utmp': No such file or directory
root@ubhost2504:~#
root@ubhost2504:~# apt list --installed | grep -E "coreutils|
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
coreutils/
procps/plucky,now 2:4.0.4-4ubuntu5 ppc64el [installed,
sysvinit-
util-linux/
root@ubhost2504:~
root@ubhost2504:~# apt list --installed | grep -E "util-linux|
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libnss-systemd/now 257.2-3ubuntu1 ppc64el [installed,
libpam-systemd/now 257.2-3ubuntu1 ppc64el [installed,
libsystemd-
libsystemd0/now 257.2-3ubuntu1 ppc64el [installed,
login.defs/
login/plucky,now 1:4.16.
python3-systemd/now 235-1build5 ppc64el [installed,
systemd-
systemd-
systemd-
systemd-sysv/now 257.2-3ubuntu1 ppc64el [installed,
systemd-
systemd/now 257.2-3ubuntu1 ppc64el [installed,
util-linux/
root@ubhost2504:~#
root@ubhost2504:~# whoami
root
root@ubhost2504:~# tty
/dev/hvc0
root@ubhost2504:~#
Contact Information = <email address hidden>
Machine Type = P10 Rainier
---Debugger---
A debugger is not configured
Userspace tool common name: systemd
The userspace tool has the following bit modes: 64-bit
The file /run/utmp is missing.
Create the file by running:
# touch /run/utmp
Adjust the ownership and permissions:
# chown root:utmp /run/utmp; chmod g+w /run/utmp
Log out from the system and log back in.
root@ubhost2504:~# who
root pts/0 2025-03-18 06:03 (10.231.203.30)
Correct. That file is missing and it should get auto generated upon reboot. But in this case it is not happening.
Manual creation of the file will solve the issue temporarily but once the machine gets rebooted, the existing file will gets deleted(this is expected) and after reboot the file will be missing again(this is a bug. regeneration of that file should happen automatically after reboot but is not happening)
We are not seeing /var/run/utmp .. installed systemd/plucky,now 257.3-1ubuntu3 ppc64el [installed,
but these file is missing.
tags: | added: architecture-ppc64le bugnameltc-212187 severity-low targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → systemd (Ubuntu) |
Changed in coreutils (Debian): | |
status: | Unknown → Confirmed |
description: | updated |
Changed in systemd (Ubuntu Plucky): | |
status: | New → Won't Fix |
Changed in coreutils (Ubuntu Plucky): | |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in coreutils (Ubuntu Questing): | |
status: | Confirmed → In Progress |
Changed in ubuntu-power-systems: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
importance: | Undecided → Low |
Changed in coreutils (Debian): | |
status: | Confirmed → Fix Released |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Fix Released |
We no longer build systemd with utmp support, which among other things, means that /run/utmp is not created by systemd's default tmpfiles.
`who` from coreutils does not yet have support for systemd-logind sessions I guess. However, `w` from procps does support this.