/build/static/layout/Breadcrumb_cap_w.png

LDAP search help

I would like to import all users in AD but eliminate users without an email address.

This works when running a query on AD but not from Kace

(&(samaccountname=*)(ObjectCategory=CN=Person,CN=Schema,CN=Configuration,DC=company,DC=local)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(department=Resources))(!(Department=ServiceAccount))(!(!mail=*)))

Kace does not like (!(!mail=*)) which removes users with out email. 

Are there any work arounds for this without me adding all users accounts without email to another group and excluding the group?

Cheers


1 Comment   [ + ] Show comment
  • Thanks for the reply. This was my first post and it took two days for IT Ninja to approve my account and this post to become public.

    I ended up adding all my external and service accounts without email to a group and excluding it: (!(memberOf=NEW-GROUP)) - JayWright 9 years ago

Answers (1)

Answer Summary:
Posted by: h2opolo25 9 years ago
Red Belt
0
The way I did it when I was adding my users, I wanted all users that had the Office field populated. So my simple query pulls only users that have physicaldeliveryofficename populated:

(&(&(&(objectCategory=person)(physicaldeliveryofficename=*)(objectCategory=user)
(mail=KBOX_USER)
)))

Note I am using their email address as the username.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ