how to disconnect idle users from a server ?

Posted on 2005-05-08
Last Modified: 2008-02-01
Hello ...
I need to do something to disconnect idle users from my shell server automatically after 1 minute since they haven't pressed any key ... can this be done ?

Question by:keepwalking
    LVL 51

    Accepted Solution

    > ..  shell server  ..
    so they are logged in into a shell?
    then simply enforce the autologout environment variable:
    TMOUT=60;export TMOUT; # bash, ksh, pdksh
    set autologout=60; # csh, tcsh

    some systems also support a TIMEOUT=60 in /etc/default/login

    Author Comment

    not after 60 seconds but after 60 seconds of no command input no key pressed
    LVL 51

    Expert Comment

    and what is different to what I suggest?

    Author Comment

    ugh one more thing ...  i want the rule active only for group users ... i don't want root to be disconnected :)
    LVL 51

    Expert Comment

    if you have made the change in /etc/profile or a like, you need to check $USER, somthing like:
    [ "`id -ng $USER`" = "users" ] && TMOUT=60

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    ​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
    BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (, affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now