Splunk Enterprise

the user has not logon AD for more than 90 days

nalia_v
Loves-to-Learn Everything

Hi.

The topic is probably already hackneyed, but I'll ask you anyway.

Classic case - the user has not logon for more than 90 days.

I want to make a request through - ldapsearch, With enrichment through blood pressure AD.

 

There is an example request https://docs.splunksecurityessentials.com/content-detail/old_passwords/

Took from the request only - there were no login for more than 90 days.

| ldapsearch search="(&(objectclass=user)(!(objectClass=computer)))" attrs="sAMAccountName,pwdLastSet,lastLogonTimestamp,whenCreated,badPwdCount,logonCount" | fields - _raw host _time
| convert timeformat="%Y-%m-%dT%H:%M:%S.%6QZ" mktime(lastLogonTimestamp) | convert timeformat="%Y%m%d%H%M%S.0Z"
| where lastLogonTimestamp > relative_time(now(), "-90d")
| convert ctime(lastLogonTimestamp)

The request is processed and takes away attributes from AD, but the time of the last login-lastLogonTimestamp does not show the former not 90 days.

Where is the error in the request ?

Labels (1)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...