1830241 Members
1866 Online
109999 Solutions
New Discussion

kill idle user

 
SOLVED
Go to solution
peterchu
Super Advisor

kill idle user

I hv a script to kill the idle user,

for x in ` who -u |awk ........ `
do

idleuser = ......

if [[ ...... ]]
then
kill $idleuser
fi
done

If I want to add a user list so that the user in the list will be be killed by the script , could suggest how to modify the script ? thx.

2 REPLIES 2
peterchu
Super Advisor

Re: kill idle user

I post to wrong forum , please ignore it , thx.
G. Vrijhoeven
Honored Contributor
Solution

Re: kill idle user

Hi,

why not use the TMOUT var in the profiles of the users//etc/default/profile.

TMOUT
If this parameter is set to a value greater than zero and you do not enter another command or Return within that number of seconds, the shell terminates.

HTH,

Gideon