Linux Remote logoff Login User

Source: Internet
Author: User
Linux Remote logoff logon user-Linux Enterprise Application-Linux server application information. The following is a detailed description. A few days ago, a server in another region crashed due to a UPS fault. After the server was restarted, the service was abnormal, and I happened to be away from the company. I called a colleague to log on and restart the service, I also told him that I had to log out after the operation, so I knew that today's regular check still found that he did not exit.

Only remote exit can be considered. Several commands are said to be acceptable, such as pkill-U uid, skill-KILL-v/dev/pts/*, but the execution is not very successful. Later, or use who-u to check the relevant process number and kill it directly. The specific operation is as follows:

[Root @ dbzj ~] # Who
Root: 0 Sep 5 :40
Root pts/1 Sep 5 :40 (: 0.0)
Root pts/2 Sep 18 (192.168.1.222)

[Root @ dbzj ~] # W
09:52:53 up 12 days, 3 users, load average: 0.00, 0.00, 0.00
User tty from login @ IDLE JCPU PCPU WHAT
Root: 0-05Sep07? Xdm? PM 0.12 s/usr/bin/gnome-
Root pts/1: 0.0 05Sep07 12 days 0.00 s 0.00 s bash
Root pts/2 192.168.1.222 0.00 s 0.00 s 0.00 s w

[Root @ dbzj ~] # Who-u
Root: 0 Sep 5 :40? 5054
Root pts/1 Sep 5 old 5208 (: 0.0)
Root pts/2 Sep 18 09:40. 28524 (192.168.1.222)

[Root @ dbzj ~] # Kill-9 5208
[Root @ dbzj ~] # Who-u
Root: 0 Sep 5 :40? 5054
Root pts/2 Sep 18 09:40. 28524 (192.168.1.222)
[Root @ dbzj ~] # Kill-9 5054
[Root @ dbzj ~] # Who
Root pts/2 Sep 18 (192.168.1.222)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.