How to find the Contacts that are not Users in one OU windows server 2003

15 pts.
Tags:
Active Directory
Active Directory Groups
Windows Server 2003
I am working on a query that needs to look up Contacts that are not Users in an OU
OU = Test Users 2
DC = Domain
DC= CA
contacs are stroed under Test Users 2
Example of a contact distinguishedName: CN=contact1,OU=Test Users 2,DC=domain,DC=ca
The queries I tried are below:
(&(objectClass=contact)(memberof=OU=Test User 2,DC=domain,DC=ca) (!objectClass=person))     - that didn't work
then i tried
(&((objectClass=person)(objectClass=contact)(memberof=OU=Test Users 2,DC=domain,DC=ca))((!objectClass= person)(!objectClass=user)))  
this didn't work either
 I tried this query because I think  I have got 2 objectClass for contacts and users  listed in the LDAP Browser such as for Contacts it see that it is objectClass= person and objectClass=contact    and for users I see objectClass=person and objectClass = user in the LDAP browser that I use.
Thanks a lot for the help in advance!!!


Software/Hardware used:
W2K3 AD, and Softrera LDAP Browser 2.6

Answer Wiki

Thanks. We'll let you know when a new response is added.

By definition a contact isn’t a user – they are two different object types

the (&(objectClass=contact)(memberof=OU=Test User 2,DC=domain,DC=ca)) won’t work because memberof refers to group membership not OU

You will need to set OU=Test User 2,DC=domain,DC=ca as the root of your search and I think all you need after that is (objectClass=contact)

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • KayaLibre
    Thank you for your reply. did you mean: (memberof=OU=Test User 2,DC=domain,DC=ca) (objectClass=contact) Please correct me if I am wrong I tried and seems like it didnt do what is suppose to do.
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following