(Jeeze some of the answers tonight are ambiguous at the least!!!)
The best way is to have something execute as the user logs in...
Have a countdown daemon running and at 0 get it to send the command "exit" - you might have to sudo the command as root.
Havent tried it, but something like:
#!bin/sh
counter = 0
while ((counter < 72000))
do
(( counter++ ))
sleep 1
done
echo <root password> | sudo -S exit
Invoke it as the user logs on like this:
countdown_to_logoff.sh &
The & at the end will cause the script to run in the background!
Last edited by sixgunz2; 09-04-2006 at 06:40 PM.
|