[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [K12OSN] Inactivity log out
- From: Julius Szelagiewicz <julius turtle com>
- To: k12osn redhat com
- Subject: Re: [K12OSN] Inactivity log out
- Date: Tue Dec 30 10:25:25 2003
On Mon, 29 Dec 2003, John P. Conlon wrote:
> In our school's situation it would be better if it were automatic, not
> something that requires human intervention. I'm one of two system
> administrators and we are both teachers elsewhere in the building. The
> most desireable option would to be not to have to run to a lab several
> times a day to clear unlogge out users. Is there such a thing?
>
> norbert wrote:
>
> > Hi Pat,
> >
> > Download and install TeacherTool, I think if you do an "apt-get
> > install teachertool" that should do the trick. Then amongst other
> > things you can logoff all the users from one simple consol
> >
> > cheers
> > norbert
> >
> > jconlon1 elp rr com wrote:
> >
> >> In my school we have two servers using K12LTSP 3.1.2.
> >>
> >> Because our district insists that all terminals be turned off at the
> >> end of the day we have run into a problem. Some of our students turn
> >> the terminal off without logging off first. The result is that the
> >> next day we have a problem when new users log on. The server's limit
> >> gets reached and the new users either can't log on or the server
> >> crashes.
> >>
> >> We need something that will log a user out if there has been no
> >> keyboard or mouse activity after a period of time. In discussions
> >> with others at my campus we would like for this time period to be
> >> system administrator set.
> >>
> >> Does such a routine exist? If it does How do we make it work?
> >>
> >> Thanks
> >> Pat
Guys,
run the following script nightly, and all will be well ... julius
#kill old leftover processes - all of them
users=$(awk -F":" '{if ( $3 >= 500 ) print $1}' /etc/passwd | grep -v -e
smb -e^nfs )
for user in $users
do
#echo $user
processes=$(ps -ef | grep ^"$user " | grep -e Jan[0-9] -e Feb[0-9]
-e Mar[0-9] -e Apr[0-9] -e May[0-9] -e Jun[0-9] -e Jul[0-9] -e Aug[0-9] -e
Sep[0-9] - e Oct[0-9] -e Nov[0-9] -e Dec[0-9] |awk '{print $2}')
for process in $processes
do
kill -9 $process
done
done
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]