Disable online login users through CentOS

Source: Internet
Author: User

Disable online login users through CentOS

When using your computer, you can find other users logging on to your computer. If other users use their own names, they can be queried through who. However, if all users log on to the system as root users, they will not be known, so we need to clear them; in addition, if the Login User suddenly breaks down, there will certainly be expired login information to be cleared

1. Find the login port;
# Who
Root pts/1 Apr 8 (172.29.0.29)
Root pts/2 Apr 8 (172.29.0.21)

2. Notify the user that he or she is about to close the service:
# Echo "I will close your connection">/dev/pts/2
In this way, the terminal displays this information.

3. Close user connection
# Fuser-k/dev/pts/2

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.