Kicking out illegal Linux users

Source: Internet
Author: User

Illegal to add users and illegal to enter the remote operation of users!

01. Illegal User Intrusion System

The simplest way is to check with the W command.

If an illegal user is confirmed to be present within the system, the user-related process can be immediately kill.

kill-9 ' Lsof-u xxx ' # # #杀掉非法用户所启动的进程
userdel-r XXX # # #删除非法用户xxx及其主目录

1. First use the W command to view the user's TTY number, then use the
skill-kill-t pts/1(or display pts/*) #踢出用户-kill can be replaced with signal-9

2. Or first use the W command to view the online users, and then:
pkill-kill-t TTY #如pkill-kill-t PTS/1

Kicking out illegal Linux users

Related Article

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.