Linux – How to list logged-in users on Scientific Linux (RHEL clone)

gnomelinux

I used to be able to check which users were logged into a machine running Scientific Linux (CERN) using w (or users or who) but this no longer works unless the user has a terminal open. Anyone who has logged in and is running a Gnome session with e.g. Firefox and Thunderbird does not show up in the list.

I'm not sure when this stopped working, but with a fully updated SLC 5.8 machine it does not work as I would expect. Is there some configuration that fixes this?

Thanks to all who made suggestions. Looks like this might be easier in just about every other version of Fedora and Red Hat, so I'll have to wait until we upgrade to version 6.

Best Answer

I believe in RHEL6 (before systemd anyhow) session management is tracked by consolekit.

Try ck-list-sessions and see if that shows you anything.

For completeness, on Fedora 16 and 17 this feature was deprecated in favour of systemd-logind which you can list sessions with using loginctl.