Do have any idea how to force the computer to log off? The situation is that at work people don't log off and leave sensitive information on their screen.
It's funny, I ran into exactly this situation years ago. I was walking by my boss's office and happened to see some interesting information on his screen. Some very interesting information.
It was performance review time, and on his screen was a spreadsheet with all the review and salary information.
Needless to say when he got back we solved that problem quickly, and the same solution might well apply here.
Become a Patron of Ask Leo! and go ad-free!
The quickest solution: enable a screen saver, and ensure that "On resume, display Welcome screen" is selected:
After the screen saver kicks in when the user returns to their computer they'll be presented with the Windows login screen. Assuming their account has a password, they'll have to enter the password to return to whatever it was they were doing and see whatever it was they had on their screen.
It's not a true log-off, but it does solve the problem of anyone walking by being able to see or access what's on the computer. And it's exactly the solution my boss implemented on his own machine.
(And, no, pointing that out to my boss didn't hurt or help me in that performance review :-) )
If you want to force a true log-off, I'm not aware of a way to make it happen on inactivity, but then you probably don't want it to happen that way anyway. A true log-off will close all open applications and possibly lose any unsaved data that the user had in those applications.
I do, in one case, force a log off on one of my machines in the middle of the night. I do that by using the "psshutdown" command:
psshutdown -o -f
"-o" logs off the console user, and "-f" forces any running applications to close. Psshutdown is one of the Sysinternals utilities and can be downloaded here.
Using the task scheduler one could schedule psshutdown to be run at a specific time each night, for example, to force a logoff. That doesn't solve the problem during the day, but it does force the log off.
There is a very similar way to do the same thing on a Mac (with Mac OS X 10.4) : go to System Preferences/Security and check the ‘Require password to wake this computer from sleep or screen saver’ box.
You can add something : in Utilities/Keychain Access, open the Preferences and check ‘Show status in menu bar’. It will allow you to open the screen saver from the menu bar.
Wow — sorry about those typos:
Another 2 cents: The WinExit screensaver (I believe part of the WinNT4 or Win2k resource kits) will log the user off after a configurable period of inactivity. I’ve used it in a few applications of shared computers. Not sure if it’s compatible with WinXP.
I managed to get it to force a logoff. It involves a registry edit but there is a key in the registry that controls the screensaver. Edit the screensaver.scr entry (Somewhere in the Users’s settings\Control\Desktop key) and make it point to A SHORTCUT or BATCH FILE.
In the shortcut or batch file, type in “shutdown -l” and if you have done it correctly, after the specified screensaver delay the user will be logged off.
You cannot put “shutdown -l” straigth into the registry, I don’t know why but I tried it myself and it didn’t work.
Also this is a forced logoff so any unsaved work WILL be lost. If you use this trick do not leave the computer with anything unsaved otherwise it will be lost.
Hope this is helpful,
Eli
Hi Leo, why wouldn’t you just use the “Window” “L” command to take you straight to the Log In screen? Its so simple and at least gives you the first layer of protection and it is immediate, i.e. you don’t have to wait for a Screen Saver . Certainly your boss could and should have used it! Mike.
15-Oct-2008
There’s this free third pary tool called Romaco Timeout which allows you to force a true logoff or shutdown after a specified time. I wrote a short post on the various ways you can use the tool. You can check it out here if you like.