All Apps and Add-ons

ldapsearch path/base parameter manipulation and command reference

dmcinnis
New Member

Hi Everyone,

I am looking at using ldapsearch / ldapfilter in a search I am launching, and I wish to change at which location the ldapsearch will look for specific objects and attributes.

using this syntax from inside the search page :

|ldapsearch domain=internal search="(objectCategory=computer)" attrs="cn,userAccountControl" | table cn userAccountControl

I get a list of computer objects and their userAccountControl values.

However I wish to only search for objects that reside in specific OU's in the AD structure.
I cannot seem to find the command reference for all parameters for "ldapsearch" within splunk that would indicate how to select parts of a domain structure.
Or can you use the full ldapsearch with command line parameters inside the search bar like "ldapsearch -h hostname.domain -b ou=myou,dc=mydomain1,dc=mydomain2,dc=mydomaintld objectCategory=computer attrs="cn,userAccountControl" and so forth? I tried this maybe inproperly and got nothing but errors.

Many thanks for any information or guidance
David.

Tags (1)
0 Karma

MuS
Legend

Hi dmcinnis,

Take a look at this app http://apps.splunk.com/app/1852/ it can be used like the *nix ldapsearch command.

cheers, MuS

dmcinnis
New Member

I found a way of restricting it somehow by adding a | search "ou=XYZ ABC " as a second search afterwards. Possibly there is a better method of accomplishing this however.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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