Solved

Emails when a user gets locked out

Posted on 2009-05-15
8
700 Views
Last Modified: 2012-06-27
Simply put, I'd like to receive an email anytime one of my users gets locked out on our SBS 2003 system. I normally only see this when I sift through event viewer. Is there a program or option somewhere that I can accomplish this.
0
Comment
Question by:Jerrod_W
8 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 24398318
This can be done using third party monitoring tools but seeing you are in SBS I'm guessing there may not be huge money in the budget for new software
You may want to check out event triggers
http://technet.microsoft.com/en-us/library/bb490901.aspx
http://windowsitpro.com/article/articleid/44431/pulling-the-event-trigger.html
http://blogs.msdn.com/krichie/archive/2006/03/30/564945.aspx
Those links should get you going.  I haven't tested this fully but it is worth trying out I think.
Thanks
Mike
0
 
LVL 84

Expert Comment

by:oBdA
ID: 24398331
You can use eventriggers.exe and blat to do this:

Eventtriggers
http://technet.microsoft.com/en-us/library/bb490901.aspx

happy mailing : Blat online
http://www.blat.net/


@echo off
set From=lockout@domain.com
set To=me@domain.com
set SMTP=smtp.domain.com
set Subject=User locked out
set EmailFile=%Temp%\%~n0.eml
>"%EmailFile%" echo A user was locked out at %Date% %Time% on %ComputerName%
"C:\Program Files\blat\blat.exe" "%EmailFile%\%LogFile%" -f %From% -to %To% -server %SMTP% -subject "%Subject%"

Open in new window

0
 
LVL 84

Expert Comment

by:oBdA
ID: 24398371
Slight correction: remove the "\%LogFile%" in the last line ...
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 3

Expert Comment

by:flopez235
ID: 24398474
We use NetWrix Account Lockout Examiner.  

http://www.netwrix.com/account_lockout_examiner.html

It works well for us because it has the option to unlock accounts either via a website (for helpdesk personnel) or email remote control (good for blackberries).
0
 
LVL 84

Expert Comment

by:oBdA
ID: 24398482
And it was bugging me that the user who was locked out was not reported.
You should be able to combine this with PsLogList to retrieve the event.
PsLogList v2.7
http://technet.microsoft.com/en-us/sysinternals/bb897544.aspx

The new script assumes that the script and the external tools are in the same folder (untested):
@echo off
set From=lockout@domain.com
set To=me@domain.com
set SMTP=smtp.domain.com
set Subject=User locked out
set EmailFile=%Temp%\%~n0.eml
:: *** set the event id of the lockout event eventtriggers is monitoring:
set EventID=
>"%EmailFile%" echo A user was locked out at %Date% %Time% on %ComputerName%; event log entry as follows:
"%~dp0psloglist.exe" -m 1 -i %EventID% security >>"%EmailFile%" 2>&1
"%~dp0blat.exe" "%EmailFile%" -f %From% -to %To% -server %SMTP% -subject "%Subject%"

Open in new window

0
 
LVL 18

Expert Comment

by:Americom
ID: 24398730
I have used Eventtrigers along with Blat. It works fine for a free tool.
You may also take a look at this free tool as well http://www.poweradmin.com/ServerMonitor/features.aspx?show=actions
0
 
LVL 27

Accepted Solution

by:
bluntTony earned 500 total points
ID: 24402314
You could just use SBS's built in monitoring facility. Go to:

Server Management | Monitoring and Reporting | Change Alert Notifications | Event log errors | 'Account Lockout' (Event ID: 539) - tick this option.

Add your email address into the text field in the 'Email Address' tab.

(If you haven't already set up monitoring and reports, click on the 'Set up Monitoring Reporting and Alerts' link and follow the wizard)

You'll then get emails whenever an account gets locked out.


0
 
LVL 4

Author Closing Comment

by:Jerrod_W
ID: 31582034
This seems to be working great. Thanks.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

790 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