如何配置使系统在某登录用户一定时间无操作时自动注销该用户?

已更新 -

系统中有一个可调整的TMOUT值,可以指定用户在登录一定时间后没有任何动作的情况下自动注销该用户。在/root/.bashrc文件中增加下面的一行:

TMOUT=3600

那么root用户在登录1小时并没有任何操作的情况下被自动注销。由于TMOUT值的单位是秒,所以要表示1小时必须换算:1小时=60...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content