Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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, although that's rather old — maybe the Fedora change didn't get into RHEL? (See also 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 Answers 4

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.

share|improve this answer

You could try

last | grep "still logged in"

share|improve this answer
    
Thanks for the suggestion, but this doesn't work either. –  Ben Jul 24 '12 at 11:52

Are you able to see all running processes?

ps aux | awk '{print $1}' | sort | uniq
share|improve this answer

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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.