Results 1 to 6 of 6
  1. #1
    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)
    When I try to kill that process:

    Code:
    [root@server2 ~]# kill 23071
    -bash: kill: (23071) - No such process
    I have also found that there is no user info for pts/0

    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
    So this command couldn't work

    Code:
    fuser -uk /dev/pts/0
    Just to provide more information:

    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
    Do you have any idea how to close both connections? When I simly logout and login again the pts/0 is still there.

    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.

  2. #2
    Join Date
    May 2001
    Location
    Dayton, Ohio
    Posts
    4,977
    Code:
    skill -t pts/0

  3. #3
    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
    Unforunately that does't help. Do you have any other idea?

  4. #4
    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

  5. #5
    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.
    the files it read are in a binary format, so you cant just read them

  6. #6
    Join Date
    Apr 2005
    Posts
    38
    Thank you. Deleting and re-creating /var/run/utmp solved my problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •