Bug 1396065 - 'who' command has blank output
Summary: 'who' command has blank output
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1396064 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-17 11:51 UTC by John Kissane
Modified: 2017-08-08 19:17 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:17:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
/var/run/utmp (768 bytes, application/octet-stream)
2016-11-18 12:17 UTC, John Kissane
no flags Details

Description John Kissane 2016-11-17 11:51:33 UTC
Description of problem:
'who' command isn't returning the list of logged in users e.g.

lnxd4bed99499df $ who
lnxd4bed99499df $

If I run this on a PC with F21 installed then it returns a list of the users logged into the system e.g.

lnxf04da2206406 $ who
dxxxxx.txxxxx pts/0        2016-11-16 17:13 (:0)
dxxxxx.txxxxx pts/3        2016-11-16 16:40 (:0)
dxxxxx.txxxxx pts/5        2016-11-16 22:39 (:0)
jxxx.kxxxxxx pts/2        2016-11-17 11:49 (10.1.65.145)


I posted about this on the Fedora Forums where someone said it's working on Fedora 25 but I don't have that installed as yet.

Version-Release number of selected component (if applicable):
coreutils-8.25-7.fc24.x86_64

How reproducible:


Steps to Reproduce:
1. Run the 'who' command
2.
3.

Actual results:
Blank

Expected results:
List of logged in users.

Additional info:

Comment 1 John Kissane 2016-11-17 17:42:13 UTC
*** Bug 1396064 has been marked as a duplicate of this bug. ***

Comment 2 Kamil Dudka 2016-11-18 12:14:41 UTC
who(1) reads the info out of /var/run/utmp by default.  Could you please attach the file?

Comment 3 John Kissane 2016-11-18 12:17:01 UTC
Created attachment 1221870 [details]
/var/run/utmp

File as requested.

Comment 4 Kamil Dudka 2016-11-18 12:31:02 UTC
Thanks!  Your /var/run/utmp does not contain any user process entries.  I have verified with a debugger that who(1) processes it correctly.  It only contains BOOT_TIME and RUN_LVL entries.  I am switching the component to systemd, which owns /var/run/utmp.

Comment 5 John Kissane 2016-11-18 14:05:10 UTC
Some extra info, I see the same behaviour on all the F24 systems that we've started to roll out to users, currently 6 in total.

Comment 6 Pádraig Brady 2016-11-18 14:34:37 UTC
Possible dupe of #1280724 ?

Comment 7 Zbigniew Jędrzejewski-Szmek 2016-11-18 18:33:08 UTC
(In reply to Kamil Dudka from comment #4)
> Thanks!  Your /var/run/utmp does not contain any user process entries
> It only contains BOOT_TIME and RUN_LVL entries.
> I am switching the component to systemd, which owns /var/run/utmp.

systemd writes the RUN_LVL, BOOT_TIME, INIT_PROCESS, etc, entries, but not information about individual logins. So we need to know which program did not write the entry you were expecting (ssh, login, gdm, sddm, kdm, etc).

Also, is your utmp owned correctly? It should look like this:
$ ls -l /run/utmp 
-rw-rw-r--. 1 root utmp 5376 Nov 15 15:58 /run/utmp

Comment 8 Zbigniew Jędrzejewski-Szmek 2016-11-18 18:44:58 UTC
(In reply to Pádraig Brady from comment #6)
> Possible dupe of #1280724 ?

No, #1280724 is (effectively) about brain damage in "who am i" which looks for the pty it is on in /run/utmp. Empty "who" output is a different case.

Comment 9 John Kissane 2016-11-21 09:10:27 UTC
lnxd4bed99499df $  ls -l /run/utmp 
-rw-rw-r-- 1 root utmp 768 Nov 21 08:44 /run/utmp
lnxd4bed99499df $ 

I noticed that if I do a non-graphical login (via <CONTROL><ALT><FX>) then it works as expected, same if I ssh onto one of the PC's.

Seems to be Window manager independent, I use Mate while a colleague uses Cinnamon.

Comment 10 John Kissane 2016-11-21 09:29:27 UTC
sddm would look to be the program running prior to login:

/usr/sbin/sddm-greeter --socket /tmp/ssdm-:0-BhaUDN --theme /usr/share/sddm/themes/02-fedora

Comment 11 John Kissane 2016-12-06 15:04:36 UTC
Switching the display manager to gdm restores the previous behaviour i.e.

system-switch-displaymanager gdm

followed by a reboot.

Then I get get: 

lnxd4bed99499df $ who
jxxx.kxxxxxx tty2         2016-12-06 15:00 (:0)

Comment 12 Fedora End Of Life 2017-07-25 23:55:19 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2017-08-08 19:17:34 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.