Reporting

Scheduled report for AD inactive accounts

SplunkVR
New Member

Hi,

I am looking for a scheduled report on AD accounts which are inactive more than 90 days. The output of the report need to have these columns.

AD Account Name, User Group, Last Login Date, Account Created, Days Inactive, Account Status (enabled/disabled)

Thanks for your replies.

Cheers.

Tags (1)
0 Karma

jfunderburg
Explorer

Great, now if I wanted to compare the lastlogontimestamp value to todaysa date and fine users who havent logged in for 'X' days... how would someone do that?

0 Karma

nickhills
Ultra Champion

Have you looked at SA-LDAP: https://splunkbase.splunk.com/app/1151/

You can query your directory for usert account statuses and get all of the detail your question mentions:
An example query to get most of what you want would look

| ldapsearch domain=your.domain.com search="(&(objectclass=user))" debug=false limit=100000 basedn="OU=your_users_ou,DC=your,DC=domain,DC=com" attrs="sAMAccountName,distinguishedName,manager,description,lastLogonTimestamp,userAccountControl,whenChanged,whenCreated" |  search userAccountControl=ACCOUNTDISABLE |table  sAMAccountName dn description lastLogonTimestamp userAccountControl whenChanged whenCreated
If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...