How do you disconnect inactive user sessions?

Posted on in Categories Ask nixCraft, Linux, Linux distribution, RedHat/Fedora Linux, Security, Shell scripting, Tips, Troubleshooting, Tuning last updated July 6, 2007

One of our regular reader hall sends an interesting question:

I work for a small company and most user login to centralized Linux server. I’d like to
automatically log out all inactive users from server for various reasons. How do I disconnect inactive user sessions?

To be frank, I don’t have any clear cut answer to question. There are at least 4-5 shells installed on a typical Linux installation. Also most user have has control over their own environment and user can switch to a different shell.

I hope our reader or seasoned UNIX admin can help to answer this question. Please share the experiences and advice in the comments.

Update: Checkout answer below in comments!

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

3 comment

  1. Hey I just added three of your articles to fsdaily.com which is a site like digg but for news and article about free software.

    Can you please add an “FSD it” link to your list of service links? It’ll make it easier for me (or anyone else) to do it with future articles you write.

    The link for this article would be:

    URL

    Thanks.

Leave a Comment