1827976 Members
2719 Online
109973 Solutions
New Discussion

Problematic Users!!!

 
Darren Etheridge_2
Super Advisor

Problematic Users!!!

Is there a way to assign user time-outs for users that stay idle for hours at a time? I am in a Informix enviornment and would like to auto logout any users that are using our INQUIRE ONLY logins after an hour or so.
Thanks for your time :)
4 REPLIES 4
Rick Garland
Honored Contributor

Re: Problematic Users!!!

Lawrence Mahan
Frequent Advisor

Re: Problematic Users!!!

In ksh there is an enviroment variable TMOUT.
If this is set to a value greater than 0 then the ksh will logout after that many seconds of no activity.

NOTE: This only works from the ksh prompt. If you are in an application this this value will not be used. Then application will have to be modified to do its own time out. This would also require that the applicaton be exec from the .profile at the time of login otherwise the application timeout would just take you to ksh and then you would have to wait for the ksh to time out.

Another idea is to use the w command and check the idle time. Then use a cron job to shut down the uses with too long of an idle time. If you do not already know how to write one of this scripts then you really should be looking at taking some HP classes. This type of script if not done properly can resault in you having zombie processes.
Erkan Durmus
Advisor

Re: Problematic Users!!!

Dear Daren,

I faced the same problem. TMOUT does not do anything for your problem as Larry said. I wrote a script to kill users which are idle for some time. You enter the time an program kills users which are idle more than that time. To prevent some users (for example root) to be killed put them in a group. More info is in script.

Regards
Erkan Durmus
Faisal Finance Sys&Web Adm.
Unix is always UNIX
Erkan Durmus
Advisor

Re: Problematic Users!!!

Dear Daren,
I forget to say that you can put the script I have posted at crontab. ( Of course after removing interactive parts.)
Erkan Durmus
Faisal Finance
Sys&Web Adm
Unix is always UNIX