Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Logging off a User

Posted on 2004-10-14
5
Medium Priority
?
219 Views
Last Modified: 2013-12-04
Hello everyone,

I work in a very large network and we have users that use a different computer every day.  This causes much grief when the user changes their password and left themselves logged into a computer, with the old password, on the network.  Is there any way to find out what computer they are logged into or is there an equivalent command to the OLD Banyan command of "mlogout" to forcefully log the user off of every workstation they are logged into?

Thanks,
Steve
0
Comment
Question by:stevespears
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
sstoyanovich earned 500 total points
ID: 12311509
Well, if you know the name of the locked machine, from another machine you can run this vbscript to log them off.

computerName = "theMachineName"
Set objWMIService = _
     GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" _
     & computerName & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
      ObjOperatingSystem.Win32Shutdown(0, 0)  ' log off
Next

You must run this using an account that has admin privileges on the remote machine, like a Domain Admin account.

As for finding out who is logged on where, you can have your logon script save a line with username / machineName / date in a central log file that you can search to find all logins.

Better yet, since you're in an enterprise, it calls for an enterprise solution.  Did you know that the security Event logs on the domain controller that logged the user in contain entries when the session (now running with the old password) is causing security failures?  I suggest an Event Log monitoring solution.  I use this one:  http://www.objsoftinc.com/files/Products/EventMaster.asp.  You can "subscribe" to be notified by email whenever there are Event Logs on your DC's indicating that an account is locked out.  You can then open the email, and see the Event Log entry - it indicates which account AND FROM WHICH MACHINE.  You can then use the script above to log out the user from that machine.

S
0
 
LVL 1

Expert Comment

by:sstoyanovich
ID: 14097028
Well, I tried to provide an answer.  The Asker never indicated whether it was good or not.  Cost me time though..
Thanks,
Sandra
0

Featured Post

2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question