I got a question from Tracy this week:
“Hi Steve. Love all the tools and tips you keep sending our way. Got a question. Is there any easy way to logoff a user when they are not active for say, 15 Minutes?”
I spoke with Tracy further to explain that forcing a logoff could cause data loss.
For example, a user has a Word document open and they walk away. Then boom the forced logoff happens and their document is gone.
In her case she needs it for public facing kiosks. If one of the technicians walks away, it leaves the system wide open.
Locking the workstation for this situation is bad too – since it makes it so the customer cannot use the machine.
Did some googling and found some hacks that used chopped up screen savers that would activate, and then call some logoff code.
Didn’t like that. So I had the team build a little app that would just logoff or lock idle users.
Here is how it works, you call the program like this:
idlelogoff.exe [timeout] [action]
timeout - The number of idle seconds before the action is taken
action - [logoff / lock / shutdown] You can lock, log the user off, shutdown or restart the workstation.
If you wanted a user to get booted off after 5 minutes (300 Seconds) of no activity, You would call it like this:
idlelogoff.exe 300 LOGOFF
If you wanted it to lock the workstation after 30 seconds of no activity this would do the trick
idlelogoff.exe 30 LOCK
If you wanted it to shutdown the workstation after 30 seconds of no activity this would do it:
idlelogoff.exe 30 SHUTDOWN
It has some sanity checking for the timeout. Anything less than 10 seconds is set to 10 seconds.
Call it from the users startup script to make sure it is active while they are logged in.
Get it from our downloads page:
It is free for personal and commercial use.
One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools