<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Active Directory User Lockout Report in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Active-Directory-User-Lockout-Report/m-p/324284#M60368</link>
    <description>&lt;P&gt;We have a similar setup: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host=dc*) source=WinEventLog:Security (EventCode=4740) (Target_Account_Name!=localadmin OR user!=localadmin) 
| eval Account=if(Target_Account_Name!=NULL, Target_Account_Name, user) 
| eval Machine=if(Caller_Machine_Name!=NULL, Caller_Machine_Name, Caller_Computer_Name) 
| fillnull Value="Unknown" Machine 
| eval Time=strftime(_time, "%m/%d/%y %H:%M:%S") 
| dedup Time, Account 
| dedup Account, Machine 
| table Time, Account, Machine
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will result in giving us the Time, Account, and Machine where the lockout occurred but it doesn't include the previous logs. We have it setup to then email our HelpDesk team inbox so they can reach out to the user (fortunately we are a small enough company this is reasonable). &lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 01:30:01 GMT</pubDate>
    <dc:creator>JordanPeterson</dc:creator>
    <dc:date>2018-01-25T01:30:01Z</dc:date>
    <item>
      <title>Active Directory User Lockout Report</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Active-Directory-User-Lockout-Report/m-p/324283#M60367</link>
      <description>&lt;P&gt;Good morning.&lt;/P&gt;

&lt;P&gt;I hope you can help?&lt;/P&gt;

&lt;P&gt;I have an existing dashboard which reports on user lock out orientated event codes from our DC's.&lt;/P&gt;

&lt;P&gt;index=index_name sourcetype="WinEventLog:Security" EventCode=4740 OR EventCode=4771 OR EventCode=4625 &lt;BR /&gt;
|eval Source=case(EventCode==4771,Client_Address,EventCode==4740,Caller_Computer_Name,EventCode==4625,Source_Network_Address) &lt;BR /&gt;
| eval Account_Name=if(EventCode==4771,Account_Name,mvindex(Account_Name,1))  | eval Account_Domain=case(EventCode==4771,Security_ID,EventCode==4740,Account_Domain,EventCode==4625,mvindex(Account_Domain,1)) &lt;BR /&gt;
| table _time, EventCode, Account_Name, Account_Domain, ComputerName, Source &lt;/P&gt;

&lt;P&gt;Ultimately, I would like to generate a report whereby if a user is locked out (EventCode=4740) the previous 60 minutes log attempts are recorded showing source machine and also the machine which the user is attempting to connect to. &lt;BR /&gt;
I will then go on to generate a script to put this in to e-mail format so that I can automatically e-mail the user with this report when they are locked out.&lt;/P&gt;

&lt;P&gt;Can anyone help? To clarify, the EventCode=4740 would be the trigger and then I would need the previous 60 minutes log attempts including source machine and destination machine in a report. Would this be a transaction or span command?&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;/P&gt;

&lt;P&gt;Rob.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:46:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Active-Directory-User-Lockout-Report/m-p/324283#M60367</guid>
      <dc:creator>soniquella</dc:creator>
      <dc:date>2020-09-29T17:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory User Lockout Report</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Active-Directory-User-Lockout-Report/m-p/324284#M60368</link>
      <description>&lt;P&gt;We have a similar setup: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host=dc*) source=WinEventLog:Security (EventCode=4740) (Target_Account_Name!=localadmin OR user!=localadmin) 
| eval Account=if(Target_Account_Name!=NULL, Target_Account_Name, user) 
| eval Machine=if(Caller_Machine_Name!=NULL, Caller_Machine_Name, Caller_Computer_Name) 
| fillnull Value="Unknown" Machine 
| eval Time=strftime(_time, "%m/%d/%y %H:%M:%S") 
| dedup Time, Account 
| dedup Account, Machine 
| table Time, Account, Machine
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will result in giving us the Time, Account, and Machine where the lockout occurred but it doesn't include the previous logs. We have it setup to then email our HelpDesk team inbox so they can reach out to the user (fortunately we are a small enough company this is reasonable). &lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 01:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Active-Directory-User-Lockout-Report/m-p/324284#M60368</guid>
      <dc:creator>JordanPeterson</dc:creator>
      <dc:date>2018-01-25T01:30:01Z</dc:date>
    </item>
  </channel>
</rss>

