From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a4f3779700e1095 X-Google-Attributes: gidfee84,public From: ivegotan%at%ombomb%dot%org@spam.spam.die.net (Dr. Strangelove) Subject: Re: logout users over night? Date: 1998/02/18 Message-ID: <34ea923b.40135060@news.demon.co.uk>#1/1 X-Deja-AN: 326145772 X-NNTP-Posting-Host: doris.demon.co.uk [158.152.173.211] References: <6ccepb$igd@herald.rt.bosch.de> Reply-To: ivegotan%at%ombomb%dot%org@spam.spam.die.net Newsgroups: comp.unix.osf.osf1 On 17 Feb 1998 16:44:27 GMT, Mario Zimmermann wrote: > >Hello > >we have a server which shares the disks over nfs to clients. >We use NIS for the user-management. > >What can we do, if we want to logout our users after midnight/over the >weekend? Write a shell script to kill off their processes and shells. Get cron to run your script at suitable times. How about something like: for pid in `ps -e|grep "\-sh"|grep -v grep|awk '{print $1}'`;do kill -9 $pid done Dr. Strangelove Rewrite the address with the obvious bits taken out if you want to mail me. mailto:ivegotan%at%ombomb%dot%org%with%no%spam%please http://www.ombomb.org/ "Put your money on 'The Bribes', they always win." - Jello Biafra