Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 11.10 installed on a laptop shared by multiple members of our family. When I execute the 'w' or 'who' command from a command line, I only see my account even though there are three users logged in.

The funny thing is, I get different results when the command is executed from each of the different accounts on the machine. When I execute the same command from my kid's account, I see mine and the kids accounts listed. When I execute it from my wife's account, I see all three accounts: her account, my account, and the kids account.

All three accounts are actively logged in, and I'm just switching between accounts and executing the same command. Why the different results? Sorry if this is simple straightforward answer. I searched and couldn't find anything.

Not sure if it matters, but I'm the only administrator on the laptop.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Desktop users won't normally show up in who because LightDM doesn't record your desktop login in utmp (see https://bugs.launchpad.net/lightdm/+bug/871070).

I wonder if, while you're testing this, you're leaving your terminal windows open:

  1. You open an xterm and run who from your own account. You're the only user with a terminal, so it only lists you. The other accounts might be running sessions in the background, but they don't get listed because LightDM didn't record their login.
  2. You leave the xterm open on your own account, switch to the kid's account, open an xterm there, and run who. Your account is still listed because it's connected to the xterm that you left running.
  3. You leave that xterm open on your kid's account, switch to your wife's account, open another xterm and run who. Now all three accounts have terminals open, so who lists all of them.
share|improve this answer
    
cscarney, you are absolutely correct. That's exactly what I was doing. I started with my account, executed the "who" command from the terminal, left the session and terminal open as you described and switched to each subsequent user. As I went along, the users listed with the "who" command were the users with the terminal window still open in the session. That explains why I was getting different users with each test, it was dependent on which user still had the terminal window open. I didn't realize this was a bug already logged in lightdm. Thanks for the response. –  BubbaJ Nov 5 '11 at 0:09

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.