Find the answer to your Linux question:
Results 1 to 4 of 4
Hi Forum, We sometimes have users logged in twice or even three times when "who" is used. How can I delete / Remove the duplicate user logins without the need ...
  1. #1
    Linux Newbie
    Join Date
    Sep 2008
    Location
    Port Moresby
    Posts
    156

    How to Delete a Login User

    Hi Forum,
    We sometimes have users logged in twice or even three times when "who" is used.

    How can I delete / Remove the duplicate user logins without the need to restart the server?? (ClarkConnect 4.1 - RHE4)

    I currently use Init 6 to solve the problem but believe there should be a better way.

    Happy Australia Day

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    This seems to work assuming the users are logging in with ssh.

    In this example the user to delete is using login device pts/3

    Code:
    # who -u
    root     pts/1        Jan 21 09:36  old        16583 (www.xxx.yyy.zzz)
    root     pts/2        Jan 25 17:41   .          1221 (www.xxx.yyy.zzz)
    root     pts/3        Jan 25 17:55   .          1467 (www.xxx.yyy.zzz)
    # ps -ef | grep 1467
    root      1467  1465  0 17:55 pts/3    00:00:00 -bash
    root      1506  1221  0 17:55 pts/2    00:00:00 grep 1467
    # kill 1465
    The who -u option lists the pid of the login shell (1467)
    You need to find the parent pid or ppid of the login shell (1465)
    Kill that process (1465)

  3. #3
    Linux Newbie
    Join Date
    Sep 2008
    Location
    Port Moresby
    Posts
    156
    Thanks for info. The logins are "smb". Will this change the method to clear a user login???

  4. #4
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    Never worked with smb so I don't know. You'd have to try it.

Posting Permissions

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