linux是一个多用户操作系统,用户可以在不同的地方链接上LINUX服务器,多用户登陆有其便利性,也存在一系列的安全隐患,这里告诉大家如何踢掉多余的登陆用户。
在系统中我们可以用w或者who来查看当前在线的用户。例如:
[root@33f ~]# who
root pts/0 2021-11-20 14:41 (125.25.33.162)
root pts/2 2021-11-20 14:30 (103.169.97.201)
或者
[root@33f ~]# w
14:42:06 up 32 min, 2 users, load average: 0.00, 0.10, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 125.25.33.162 14:41 6.00s 0.02s 0.01s w
root pts/2 103.169.97.201 14:30 11:34 0.02s 0.02s -bash
看看那个是自己登录额pts
[root@33f ~]# who am i
root pts/0 2021-11-20 14:41 (125.25.33.162)
可以看到自己是pts/0,接下来使用pkill踢掉用户2
[root@33f ~]# pkill -kill -t pts/2
接着用w或者who再次查看
[root@33f ~]# w
14:42:06 up 32 min, 2 users, load average: 0.00, 0.10, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 125.25.33.162 14:41 6.00s 0.02s 0.01s w
已经成功t掉了。
版权属于: 三三世界-百宝箱
本文链接: http://33f.net/safe/centos_kill_user.html
本文最后更新于2021年11月20日 ,已超过1127天没有更新,若内容或图片失效,请留言反馈。
本文允许转载,但请在转载时请以超链接或其它形式标明文章出处
@Doug Shume it's ok for me , you can post here.
Saved as a favorite, I like your website!
If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.
Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!
Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.
Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.
zh.us.to 有效
kms.03k.org 有效
kms.chinancce.com
kms.shuax.com 有效
kms.dwhd.org 有效
kms.luody.info 有效
kms.digiboy.ir 有效
kms.lotro.cc 有效
www.zgbs.cc 有效
cy2617.jios.org 有效
@ 权限问题,试试sudo 再加命令。
你好提示Permission denied 怎么办啊