[K12OSN] Automatic user logout script?

Robert Arkiletian robark at gmail.com
Fri Dec 8 18:56:55 UTC 2006


On 12/8/06, Petre Scheie <petre at maltzen.net> wrote:
> How about this:
>
> #!/bin/bash
> for ID in $(awk -F: '$3 >= 500 {print $1}')

shouldn't that be

for ID in $(awk -F: '$3 >= 500 {print $1}' /etc/passwd)

> do
> pkill $ID
> done
>
> Put this into a file, make it executable (chmod +x), and then set root's crontab to run
> it at, say 5pm.  Fedora defaults to starting user UID numbers at 500 and going up from
> there, so we avoid killing any system processes.
>
> Petre
>
> Jim Anderson wrote:
> > Is there a script available to automatically log out users at the end of
> > the day from K12LTSP?  I have users that tend to leave while still
> > logged in.  Relatedly, is there a way to force a logout remotely from a
> > terminal prompt as root?
> >
> > K12LTSP v.5.0
> > Dell Pentium D 2.8 GHz, 2 GB RAM
> > 24 GX1 clients
> >
> > Jim
> >
> >
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN at redhat.com
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see <http://www.k12os.org>
> >
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>


-- 
Robert Arkiletian
Eric Hamber Secondary, Vancouver, Canada
Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/
C++ GUI tutorial http://www3.telus.net/public/robark/




More information about the K12OSN mailing list