Results 1 to 6 of 6
-
09-26-2006, 10:06 AM #1Junior Guru Wannabe
- Join Date
- Apr 2005
- Posts
- 38
How to close concurrect root connections?
Hi everybody,
I have spent more that hour trying to google the solution, but without any succsess.
I want to close my root pts/0 connection (the pts/2 is me):
Code:[root@server2 ~]# who -tu root pts/0 Sep 25 09:11 ? 23071 (xxx.xxxxx.com) root pts/2 Sep 26 08:53 . 24376 (xxx.xxxxx.com)
Code:[root@server2 ~]# kill 23071 -bash: kill: (23071) - No such process
Code:[root@server2 ~]# ls -la /dev/pts total 0 drwxr-xr-x 2 root root 0 Sep 24 07:03 . drwxr-xr-x 8 root root 5140 Sep 24 07:04 .. crw--w---- 1 root tty 136, 2 Sep 26 08:57 2
Code:fuser -uk /dev/pts/0
Code:[root@server2 ~]# users root root [root@server2 ~]# w 08:54:08 up 2 days, 1:50, 2 users, load average: 0.06, 0.07, 0.08 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/2 xxx.xxxxx.com 08:53 0.00s 0.01s 0.00s w
When I restart or reload sshd, the pts/0 is also still there.
I am quite new to linux, maybe this has got simple answer, so thanks a lot for any suggestion.
-Elliot.
-
09-26-2006, 10:17 AM #2Web Hosting Master
- Join Date
- May 2001
- Location
- Dayton, Ohio
- Posts
- 4,977
Code:skill -t pts/0
-
09-26-2006, 10:32 AM #3Junior Guru Wannabe
- Join Date
- Apr 2005
- Posts
- 38
Prohacker, thank you for quick reply.
Code:[root@server2 ~]# skill -KILL -v -t pts/0 [root@server2 ~]# users root root
-
09-26-2006, 01:22 PM #4Junior Guru Wannabe
- Join Date
- Apr 2005
- Posts
- 38
I have searched a lot and I know much more about killing processes now. But from what I have find out, in my case, it is not problem of how to kill it - because it is not even a process. "-KILL -9 -v -t pts/0" would kill otherwise.
Is think that the output of "who" and "users" commands is incorrect.
So my question is, is there a way to correct this without rebooting?
Is there log file wor "who" and "users" command?
(CentOS 4.4)
Thanks a lot.
-Elliot
-
09-26-2006, 02:21 PM #5Web Hosting Master
- Join Date
- Apr 2003
- Location
- UK
- Posts
- 2,569
from the man page:
If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common.
-
09-26-2006, 03:27 PM #6Junior Guru Wannabe
- Join Date
- Apr 2005
- Posts
- 38
Thank you. Deleting and re-creating /var/run/utmp solved my problem.