Ask Leo!

How can I force a computer to sign out automatically?

Home » Windows » Windows Configuration

Summary: If you leave something sensitive on your display and then walk away, anyone can see it. There are steps you should take if that's a potential problem.

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.

The quickest solution: enable a screen saver, and ensure that "On resume, display Welcome screen" is selected:

Screen Saver settings

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 :-) )

"The quickest solution: enable a screen saver"

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.

Related:

Article 11471 | Posted May 9, 2007

Recent Comments
0 Comments

Does this work with Mac's as well?

Posted by: George Arauz at May 10, 2007 5:03 AM

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.

Posted by: Thierry Delettre at May 10, 2007 8:03 AM

Er, Leo. You might want to reread what you put it bold face type...

Posted by: Dan Ullman at May 10, 2007 9:07 AM

er, IN not IT :)

Posted by: Dan Ullman at May 10, 2007 9:08 AM

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.

Posted by: Dominick Franzini at May 12, 2007 12:34 PM

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

Posted by: Eli Coten at May 12, 2007 4:14 PM

Post a comment on "How can I force a computer to sign out automatically?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

New!

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Ask Your Question:


ask-leo.com
Web

Stay Informed

Weekly Newsletter

Archives

By Category
By Date

Advertisers

Advertise on Ask Leo!

««   »»

Question? - Ask Leo!
Who is Leo?
Link to Leo!

Terms, Conditions & Privacy