6

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.

Ben
  • 153
  • 2
  • 10
  • What happens with the w or who commands? What used to happen? – mpez0 Jul 23 '12 at 15:14
  • Unable to reproduce under Red Hat. (Which you would think would be similar enough.) How are you authenticating? Local users, LDAP, WinBind, etc? – Aaron Copley Jul 23 '12 at 17:28
  • 1
    I think it's probably [this bug](https://bugzilla.redhat.com/show_bug.cgi?id=209537), although that's rather old — maybe the Fedora change didn't get into RHEL? (See also http://blogs.gnome.org/halfline/2007/06/29/login-records/) – mattdm Jul 24 '12 at 14:25
  • You are receiving output though right? There are no errors? – JMeterX Jul 26 '12 at 18:44

4 Answers4

1

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.

Matthew Ife
  • 22,927
  • 2
  • 54
  • 71
0

You could try

last | grep "still logged in"

Nikolaidis Fotis
  • 1,994
  • 11
  • 13
0

Are you able to see all running processes?

ps aux | awk '{print $1}' | sort | uniq
Nick R
  • 183
  • 1
  • 5
-1

I don't know that this will work, and since I'd rather die than use an RHEL-type box as a desktop[1] I have no way to test it, but have you tried finger?

[1] Don't get me wrong, I love RHEL as a server OS, but as a desktop I find it a bit like being stuck in 1995. All my desktops run Fedora, I'm afraid.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • Finger isn't installed by default, but it should show the terminal/session information. The `w` and `who` command did change, though. – ewwhite Jul 23 '12 at 13:13
  • Finger gives the same result as the other commands, but thanks for the suggestion. – Ben Jul 24 '12 at 11:52
  • OK, sorry. What are you trying to get, exactly? Do you want a list of the users who are running processes on your machine? Do you want a list of users who have authenticated via gdm but not yet logged out? – MadHatter Jul 24 '12 at 11:55
  • I guess so, although some users use KDE for example, and I would prefer a single solution to one per window manager. What I really want is a list of users who will be justifiably annoyed if the machine is rebooted. People running long non-interactive processes don't count because they should be using our batch system. – Ben Jul 24 '12 at 15:40