LDAP Filter for find all computer on a OU
Hi Guy's,
I have a problem here. I just create a LDAP filter for list all computer in the OU IT and when I run this on LDAP Browser for test all work fine, then I save it and all goes wrong.
in my test I have this:
Search Base DN:
OU=IT, OU=Computers, OU=CH, DC=qxlricardo,DC=internal
Search Filter:
cn=zug*
Result:
MY_COMPUTER
then I save it and now I have all computers and servers there.
Any Idea how can I fix it???
Best regards,
Rildo
I have a problem here. I just create a LDAP filter for list all computer in the OU IT and when I run this on LDAP Browser for test all work fine, then I save it and all goes wrong.
in my test I have this:
Search Base DN:
OU=IT, OU=Computers, OU=CH, DC=qxlricardo,DC=internal
Search Filter:
cn=zug*
Result:
MY_COMPUTER
then I save it and now I have all computers and servers there.
Any Idea how can I fix it???
Best regards,
Rildo
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
jkatkace
14 years ago
The way that LDAP filters work is that every time a machine checks in, the KBOX runs every search filter, looks for a positive hit when running the search, and if it gets one, the machine gets that label. The way you've written your search, results always come back, so all machines will be put into the label because every time it runs, we get a result back. You want to narrow the search so that ONLY if the machine checking in has that CN set, you get a hit. Fortunately, that should be easy to do.
If you take a look at the right-side help bar when creating the filter, there's a set of macros you can use to parameterize the search. That's the important part on KBOX: you want to put one of those macros in your search string. Here they are:
KBOX_COMPUTER_NAME
KBOX_COMPUTER_DESCRIPTION
KBOX_COMPUTER_MAC
KBOX_COMPUTER_IP
KBOX_USERNAME
KBOX_USER_DOMAIN
KBOX_DOMAINUSER
KBOX_CUSTOM_INVENTORY_*
So, you want toYou might make it be something like
(&(name=KBOX_HOST_NAME)(CN=zug*))
Here's the definitive reference on LDAP search strings. Remember that if we get a hit for a search when a machine checks in, we give it that label. Parameterizing the search with one of these KBOX macros is important.
http://www.faqs.org/rfcs/rfc2254.html
If you take a look at the right-side help bar when creating the filter, there's a set of macros you can use to parameterize the search. That's the important part on KBOX: you want to put one of those macros in your search string. Here they are:
KBOX_COMPUTER_NAME
KBOX_COMPUTER_DESCRIPTION
KBOX_COMPUTER_MAC
KBOX_COMPUTER_IP
KBOX_USERNAME
KBOX_USER_DOMAIN
KBOX_DOMAINUSER
KBOX_CUSTOM_INVENTORY_*
So, you want toYou might make it be something like
(&(name=KBOX_HOST_NAME)(CN=zug*))
Here's the definitive reference on LDAP search strings. Remember that if we get a hit for a search when a machine checks in, we give it that label. Parameterizing the search with one of these KBOX macros is important.
http://www.faqs.org/rfcs/rfc2254.html
Posted by:
jkatkace
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.