[K12OSN] cron to kill users or group?

Sudev Barar sbarar at gmail.com
Sat Mar 25 04:40:20 UTC 2006


On 25/03/06, Robert Arkiletian <robark at gmail.com> wrote:
> On 3/24/06, Petre Scheie <petre at maltzen.net> wrote:
>
> How about something like this
>
> for x in `last | grep 'still logged in' | awk '{print $1}' | sort | uniq`
> do
> pkill -u $x
> done
>

This woul knock off even terminal / ssh sessions. Maybe you need to
add in string:
grep ws|grep ltsp|

Assuming your domain is ltsp and you have used naming convention of
ws001....ws200... etc.

--
Sudev Barar
Learning Linux




More information about the K12OSN mailing list