On Jul 28, 12:37 pm, Peter Sagerson <
psag...@ignorare.net> wrote:
> That's pretty strange behavior. Filtering the results as you describe does
> kind of smell like a hack, although it's hard to see what harm it could do. I
> would like to understand the problem a little bit better. Can you tell me
> what LDAP server you're running? Have you tried pulling up a Python shell and
> playing with ldap.search_s() in different areas of the directory to see if
> the behavior is universal? I don't suppose this is a publicly-accessible LDAP
> server by any chance?
It's not a public server, no. I don't actually have direct access to
the server
so I don't know much about it. I suspect it is Microsoft based, based
on seeing
references to Microsoft and Exchange in the search results, but I
don't know
for sure.
I wasn't specifying an "OU" in the base_dn, I tried making that
explicit and it
does return just one result when I do that. The problem is that I need
to
authenticate users that could be from different organizational units.
For example: "OU=CANADA,DC=mydomain,DC=com", and
"OU=USA,DC=mydomain,DC=com".
If I leave out the "OU", it finds them regardless of where they are
from, but
returns the 2 null entries at the end. If I include it, then it only
works for
a subset of users (Canada, or USA). The full base_dn for me (from
inspecting
the search results) is
"OU=Users,OU=Toronto,OU=Canada,DC=mydomain,DC=com". I
tried just specifying "OU=Users,DC=mydomain,DC=com", but that does not
work.
Any thoughts or ideas? Thanks.
- Matt