Computer incorrectly reports number of logged in users
Hi,
My machine is incorrectly reporting the number of users currently logged in. It always thinks I am logged in on tty1 when it isn't the case. I logged in on tty2 and the output of `who` is Code:
philip tty2 Oct 19 19:59 Code:
20:00:33 up 6 days, 8:28, 2 users, load average: 0.00, 0.00, 0.00 Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND Whats happening? Also the first time I fire up the machine it correctly reports 0 users until I have logged in/out of tty1 a few times I have noticed nothing unusual in the logs, and if it was showing me logged in a virtual terminal I would be a lot more worried that my system has been breached thanks for any input |
Do you have X running during this time or any other terminals opened? Each one will display as a login and use up a tty.
I can login, startx, and open up 20 terminal windows which will all show up as being logged in for each. |
When it says one user logged in, there was noone logged in and X wasn't running. The only thing running on tty1 was agetty by root
At the minute I have logged in on tty1, started X and have one xterm running, and the ouput of `who` is correct: Code:
philip tty1 Oct 20 08:05 |
What's the php script? It isn't making this phantom login is it?
|
I don't think so, it does make use of shell_exec().
However apache is run as nobody, but the logged in user is me 'philip'. And in my first post I logged in on tty2 and made sure no one was logged in on tty1 and it still showed me logged in on tty1. For reference the bit of php is simply PHP Code:
If this script was making a terminal, then surely it would be pts/n type terminal? Another Edit: I shutdown X and logged out, so that no one at all was logged in, I then logged in on tty2. The output of who showed that I was also logged in on tty1. The log in time was correct - the system just hasn't recognised that I was no longer logged in on tty1. The output of `ps aux` whilst only being logged in on tty2 is: Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND |
Anyone?
It seems that the system is not registering that I have logged off tty1, the login time provided by `who` is always correct. |
All times are GMT -5. The time now is 10:31 AM. |