How can I kick out an idle user from UNIX?

How can I kick out an idle user from UNIX?

Post by ·s?_?q?? » Fri, 31 Jan 1997 04:00:00



[ Article crossposted from comp.unix.admin ]
[ Author was s?_?q??? ]
[ Posted on 30 Jan 1997 13:51:29 GMT ]

Hi,

  Is there any way / script to monitor a user :

  If this user has been idle for 10 mins then the script can kick
him out (help him/her logout)

--
< s?_?q??? >

--
< s?_?q??? >

 
 
 

How can I kick out an idle user from UNIX?

Post by Zora » Fri, 31 Jan 1997 04:00:00



> [ Article crossposted from comp.unix.admin ]
> [ Author was s?_?q??? ]
> [ Posted on 30 Jan 1997 13:51:29 GMT ]

> Hi,

>   Is there any way / script to monitor a user :

>   If this user has been idle for 10 mins then the script can kick
> him out (help him/her logout)

Most shells have a autologout timeout setting that can be set to say
30min. After which it will automatically logout.

I suppose you could do a who and use awk to get the idle column. If the
idle value is greater than 30min then search (with ps) and kill the
shell process.

Zoran.

 
 
 

How can I kick out an idle user from UNIX?

Post by 1 » Sat, 01 Feb 1997 04:00:00


:*<8)    Is there any way / script to monitor a user :
:*<8)    If this user has been idle for 10 mins then the script can kick
*<8)  him out (help him/her logout)

 .. if u are using KORN shell, and add the following line in the user's .profile
    TIMEOUT=10  # autolog out if idle for 10minutes.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ng Yee San  aka 13                  


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          

 
 
 

How can I kick out an idle user from UNIX?

Post by Tim Yoc » Sat, 01 Feb 1997 04:00:00


Using csh/tcsh set the autologout variable in ~/.cshrc

The default autologout time is one hour; toss in 10 and you're all
set. The only drawback is that there is no warning before the user is
logged out.

- Tim


Quote:>[ Article crossposted from comp.unix.admin ]
>[ Author was s?_?q??? ]
>[ Posted on 30 Jan 1997 13:51:29 GMT ]

>Hi,

>  Is there any way / script to monitor a user :

>  If this user has been idle for 10 mins then the script can kick
>him out (help him/her logout)

>--
>< s?_?q??? >

>--
>< s?_?q??? >

 
 
 

How can I kick out an idle user from UNIX?

Post by Brian S Hil » Sat, 01 Feb 1997 04:00:00


: Is there any way / script to monitor a user :
: If this user has been idle for 10 mins then the script can kick
: him out (help him/her logout)

The simple answer is: if the user is using ksh, in /etc/profile, add:

TMOUT=600
unset TMOUT

P.S. I don't know what you see on your screen, but your username is coming
     out in ANSI characters on mine (and most of the world's, I would presume.)

-Brian
--
   ,---.     ,---.     ,---.     ,---.     ,---.     ,---.     ,---.  
  /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \  

__,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.__

 
 
 

How can I kick out an idle user from UNIX?

Post by Rich K » Sun, 02 Feb 1997 04:00:00





>: Is there any way / script to monitor a user :
>: If this user has been idle for 10 mins then the script can kick
>: him out (help him/her logout)

>The simple answer is: if the user is using ksh, in /etc/profile, add:

>TMOUT=600
>unset TMOUT

 ^^^
   don't you mean export? unset will just undo the assignment.
   a user can always set their own TMOUT value unless the shell
   is restricted.

   richk

>P.S. I don't know what you see on your screen, but your username is coming
>     out in ANSI characters on mine (and most of the world's, I would presume.)

>-Brian
>--
>   ,---.     ,---.     ,---.     ,---.     ,---.     ,---.     ,---.  
>  /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \  

>__,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.__