简体   繁体   English

如果权限已被修改,如何为用户自动结束/销毁现有的已连接腻子会话(任何telnet或ssh)

[英]How to auto end/destroy an existing connected putty session (any telnet or ssh) for a user, if permission has been modified

如果“ root”更改了该用户不访问任何cmd的权限,如何为该用户自动结束/销毁现有的已连接腻子会话(任何telnet或ssh)?

I'm not clear of the situation. 我不清楚情况。 Are you asking how a sys admin could kill existing connections? 您是否在问系统管理员如何杀死现有连接?

ps -fu joebob | awk '{print $2}' | xargs kill -9

or you could restrict it to only processes with a controlling terminal with a little bit of more programming (and not kill joebob's process that are in the background). 或者您可以将其限制为仅在控制终端上进行一些更多编程的进程(而不会杀死后台的joebob进程)。

Or is this from the perspective of the uesr himself? 还是从欧洲人本人的角度来看? exit is an internal shell command that will terminate the shell. exit是一个内部Shell命令,它将终止该Shell。 Most shells also have an auto log out feature where it logs out after so many seconds of inactivity. 大多数外壳程序还具有自动注销功能,可以在经过这么多秒钟的不活动后将其注销。

So far, it seems too contrived of a situation. 到目前为止,似乎太虚构了一种情况。 What are you really trying to do? 您到底想做什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM