Friday, June 27, 2008

Force an account to logout after a specified period

To force an account to logout after a specified period regardless of activity:

Warning: this is an evil script as is and will for a user logout every 300 count. When set correctly, this script can be very handy if you are working on a server remotely and lose connection to the server leaving it vulnerable to local inhabitants.
---------

while [i]; do
cd system/library/coreservices/menu extras/user.menu/contents/resources
./cgsession - suspend
sleep 300

---------

Script courtesy of Schoun Regan during the Apple East Coast Education Conference.

No comments: