Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514864 - Command w shows multiple users logged in
Summary: Command w shows multiple users logged in
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-session
Version: 27
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-19 00:50 UTC by Fabrizio
Modified: 2018-11-27 22:51 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-27 22:51:57 UTC

Attachments (Terms of Use)

Description Fabrizio 2017-11-19 00:50:23 UTC
Description of problem: When you type the command w in Terminal, it shows n users logged in. Then if you Log out your user will be logged out (i'm using gnome) and if you Log in again with the same user, the w command in Terminal will show n+1 users logged in, if you log out and log in again, it will show n+2 users...and so on.

Version-Release number of selected component (if applicable):

How reproducible: Every time you log in,out and in again in a gnome-session

Steps to Reproduce:
1. Log in with a user using gnome-desktop-menager, type w in Terminal and Enter
2. see the number n of users logged in. Logout and login again with that user
3. type w in Terminal and Enter. The users logged in are now n+1

Actual results: Logging out and in again, will increase the number of users logged in when using w command from Terminal

Expected results: Logging out and back in again should show only 1 user logged in when using w command from Terminal

Additional info:

Comment 1 Germano Massullo 2017-11-22 20:52:04 UTC
Hi Fabrizio, thank you for your report.
dnf provides /usr/bin/w
says that 'w' is a program that belongs to procps-ng package, so I am reassigning the bugreport component to procps-ng.

Comment 2 Jan Rybar 2017-11-27 17:49:11 UTC
Hello Fabrizio,

thanks for the catch.
'w' is actually using getutent() from utmp, which is a user tracking magic storing the information about logins in file /var/run/utmp. (hit 'man utmp' for more info :) )

When I look at the file under Gnome Shell, I can see multiple records of the user (i.e. me :D) after I logged in multiple times. This does not happen under KDE, which I tested.

It seems that gnome-session-manager forgets to update the records within utmp file when a user logs out.

I'll do my best to redirect this issue to the devs concerned.

Thanks and have a nice day.

Comment 3 Ben Cotton 2018-11-27 15:13:09 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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 4 Fabrizio 2018-11-27 22:51:57 UTC
fixed in recent versions of Fedora

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