LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IDLEOUT , TMOUT --> Logout users of a specified period of idle time. (https://www.linuxquestions.org/questions/linux-newbie-8/idleout-tmout-logout-users-of-a-specified-period-of-idle-time-4175429867/)

barnarasta 10-01-2012 03:45 AM

Idleout in SQUEEZE
 
Good morning fellow,
I am in process of migrating to Unix, SCO Debian Squeeze ( only console, NO GRAPHIC gdm ) and I can not solve the problem of expired connections.

In SCO idelout use the instruction set in / etc / default / idleout idle values ​​= seconds.

In Linux I do not see where to set this situción.
TMOUT there is, but it is not valid, TMOUT only "kill" inactive sessions are in "prompt" or bash shell.

I have in production an "ERP" users to "login" with the same name from "putty" ssh,
but very often closed "putty" without logging off, so it is eternally busy / dev / PTSX.
******************************************
Also see the configuration of / etc / ssh / sshd_config adding:
keepalive yes
ClientAliveInterval 3600 (1 hour)
but has no effect NONE.
**********************************************
Also i was looking at the packages
autolog "aptitude install autolog", last updated in 2002,
but performed the searches of inactive username and serves me, all my users enter the same login to "ERP"
**********************************************
Also see the package "idleout"
"http://sourceforge.net/projects/idleout/" contains the sources but I can not understand,
is imperative to have installed "finger" for installation and
the "daemon" in / etc/rc2.d must be performed manually.

its performance is quite good, but inexplicably the 'daemon' stops working after 2 hours of boot from / etc / init.d / idleout start.

I will appreciate if anyone knows any package or script that succeed logout users of a specified period of idle time.

I find it really surprising that Linux does not incorporate the function "idleout" as the basis of its installation.


1salu2
and thanks in advance for your attention.

barnarasta 10-01-2012 07:20 AM

IDLEOUT , TMOUT --> Logout users of a specified period of idle time.
 
Good morning fellow,

I am in process of migrating to Unix SCO --> Debian Squeeze (single console, not graphics) and I can not solve the problem of expired connections.


In SCO idelout use the instruction set in /etc/default/idleout idle values ​​= seconds.

In Linux I do not see where to set this situción.

TMOUT there is, but it is not valid, TMOUT only "kill" inactive sessions are in "prompt" or bash shell.

I have in production an "ERP" users to "login" with the same name/login from "putty" ssh,
but very often closed "putty" without logging off, so it is eternally busy /dev/ptsX.

******************************************
Also see the configuration of /etc/ssh/sshd_config adding:

keepalive yes
ClientAliveInterval 3600 (1 hour)

but has no effect NONE.

**********************************************
Also i was looking at the packages

autolog "aptitude install autolog", last updated in 2002,

but performed the searches of inactive username and serves me, all my users enter the same login to "ERP"

**********************************************
Also see the package "idleout"
contains the sources but I can not understand.
** is imperative to have installed "finger" for installation and
the "daemon" in /etc/rc2.d must be performed manually.

its performance is quite good, but inexplicably the 'daemon' stops working after 2 hours (aprox) of boot from /etc/init.d/idleout start.

I will appreciate if anyone knows any package or script to perform properly the "kill" process "idle".



I find it really surprising that Linux does not incorporate the function "idleout" as the basis of its installation.





1salu2

and thanks in advance for your attention.

bigrigdriver 10-01-2012 08:11 AM

These articles might help:
http://www.walkernews.net/2007/05/15...user-in-linux/
http://eng.eelcowesemann.nl/linux-un...ut-idle-users/
http://www.cyberciti.biz/faq/linux-t...gout-variable/

barnarasta 10-01-2012 09:34 AM

Thanks for your interest and references "bigrigdriver"
but unfortunately that TMOUT comment and is not valid for my intention, TMOUT only works if the user was prompt, but if you are working within a process, cobol, java, dialog, Oracle, Informix, etc ... and closes his notebook without 'logout', does not perform TMOUT expulsion "kill PID" being active user / dev / pts

Tinkster 10-01-2012 11:30 PM

I merged your two *cough* closely related threads, and politely ask
that you don't double-post in the future.


Thanks!

Cheers,
Tink

barnarasta 10-02-2012 02:47 AM

Quote:

Originally Posted by Tinkster (Post 4794565)
I merged your two *cough* closely related threads, and politely ask
that you don't double-port in the future.

Thanks!

Cheers,
Tink

My apologies,
I may do a double click by mistake and created two thread

Celyr 10-02-2012 03:04 AM

I think that the easiest solution is to modify the program that you are using throught putty to actually have a timeout (so it will return to the prompt and get flushed after some time). I think also that this has to be the desidered behavior, let me explain:
Il something kills the program after a timeout then there is the risk of data loss, if the program closes itself then there is no more risk. Now if this is feasible or not that depends on the program that you are using.

barnarasta 10-02-2012 04:58 PM

Thanks "Celyr" for your opinion,
to people who connect to the server SQUEEZE, I try to continually educate them to close properly but the connection is not always possible.

Took weeks looking for a package "idleout" similar to that in SCO-Unix but can not find anything really useful and I think if Debian is really intended for data server for "ERP" with Informix Software, Oracle, Cobol, Sculptor, etc .... or is only for web Serbs and / or starting to think to create competition with "windows" and forgetting their desks console functions only, text only.

I'm not a espert in-shell script, but I started to gather information and I think the situation can be resolved:

1) Initially locating PID exceeding 60 minutes inactive.

Code:

who-Tu | awk '$ 6> "01:00" {print $ 1, $ 3, $ 7}'
2) Kill the resulting processes

Code:

/ bin / kill -13-Tu `who | awk '$ 6>" 01:00 "{print $ 7}'`
3) finally put in a cron.hourly to run .

For now the point (2) does not work :cry:
If someone wants to help me do it I'll be happy.

Tinkster 10-02-2012 06:53 PM

Can you please use code-tags rather than quotes?
And what is kill -13-Tu supposed to do?


Also I don't understand how you (or SCO's idleout, for that matter) can
possibly tell the difference between a session that's being actively
used and one that's just sitting there if it's NOT bash. Killing
everything arbitrarily after one hour seems like a recipe for
disaster to; but of course just knowing that you're using some sort
of ERP doesn't tell us much about use-cases, or usage patterns.



Cheers,
Tink


All times are GMT -5. The time now is 03:08 AM.