[K12OSN] Automatic user logout script?
Petre Scheie
petre at maltzen.net
Fri Dec 8 19:17:38 UTC 2006
Yes, it should! And here I had the gall--the gall!--to suggest to my son that he check
his homework before handing it in to his teacher. ;-) Thanks Robert.
Petre
Robert Arkiletian wrote:
> 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>
>>
>
>
More information about the K12OSN
mailing list