Link to home
Start Free TrialLog in
Avatar of aaromba
aarombaFlag for Australia

asked on

How do I LDAP active users from AD

Hi All,

I have a query and desperetly need some advise :)

I need to LDAP all active users from AD. I'm very fresh to LDAP scripts (I can do OU=xxx,DC=company,dc=com ;) so I'm not sure how to script the filter.
Got this so far but it is not working (&(&(objectClass=user)(OU=company Users,DC=company,DC=com)))

I thought I will add a LDAP browser image to help out.

Any help will be greately apprecaited. Thanks :)

 
Avatar of dacasey
dacasey
Flag of Canada image

Try
(&(&(objectClass=user)(CN=company Users,DC=company,DC=com)))
Avatar of Chris Dent

You cannot filter based on OU within an LDAP query, you have to set a Search Root / Base for the query.

Chris
Avatar of aaromba

ASKER

Thanksfor your feedback guys. Much appreciated.  

decasey, for some strange reason your query does not work. Perhaps this is my soft limitation.

Chris, I'm not sure (lack of experience in LDAP) what do you mean by set a search root / base for the query. Could you be a bit more specific please :) I'm an LDAP blond haha



What are you using to do the query? Perhaps we can provide something with a bit more context? :)

Chris
Avatar of aaromba

ASKER

sorry for late reply (Perth time :)
I am using HEAT (Service Desk app) LDAP. I have attached the screenshot of how it looks. Seems that I cannot use filters in Base DN. I can filter it using Object Classes (I believe, need to test it) below)   User generated image
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aaromba

ASKER

Ha! Chris This has worked beautifully! Thank you very much for your help mate!! Much appreciated!