473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Re: python-ldap - Operations Error

Thanks for the help guys, it works! I used the
ldap.set_option(ldap.OPT_REFERRALS, 0) from http://peeved.org/blog/2007/11/20/
immedialtey after import, then did the initialize trace_level=2 and
did the simple_bind_s. I was able to search and get the results.
That trace_level thing is nice, i'm sure i will be debugging this more
as i move forward :)

Not sure if this is an AD thing or just something i needed to do with
our particular server/config.

Thanks again!
Jun 27 '08 #1
2 2263
On Apr 24, 2:02 pm, theivi...@gmail.com wrote:
Not sure if this is an AD thing or just something i needed to do with
our particular server/config.
Glad to hear my posting helped somebody.

In our case, our domain controller was passing us referrals to the
Configuration, ForestDNSZones, and DomainDNSZones partitions of the
directory when we were doing SCOPE_SUBTREE scoped searches from the
root DN of an AD domain. When python-ldap tried to chase those
referrals it did so with an anonymous bind, hence the error.

Once we turned off the OPT_REFERRALS option, our only other
consideration was to be sure that, when iterating over our search
results, we just scrubbed out the referrals that were returned (based
on the referrals being lists and the real search results being
dictionaries). This is a bit quick and dirty, perhaps, but it's what
did the trick for us.

Evan

Jun 27 '08 #2
th*******@gmail.com wrote:
Thanks for the help guys, it works! I used the
ldap.set_option(ldap.OPT_REFERRALS, 0) from http://peeved.org/blog/2007/11/20/
Hmm, maybe I should generally switch off referral chasing in python-ldap
forcing applications to enable it if needed overriding libldap's
default. I did this already for LDAPObject.protocol_version where
libldap's default is LDAPv2 and python-ldap sets it to LDAPv3 in
LDAPObject.__init__(). Although this was an incompatible change no-one
complained.
immedialtey after import, then did the initialize trace_level=2 and
did the simple_bind_s. I was able to search and get the results.
That trace_level thing is nice, i'm sure i will be debugging this more
as i move forward :)

Not sure if this is an AD thing or just something i needed to do with
our particular server/config.
Basically the concept of LDAPv3 referrals is broken since there's no
concept for specifying how to bind to the referral's target without
a-priori local configuration. See also an old posting to
news:microsoft.public.windows.server.active_direct ory related to this:

http://groups.google.com/group/micro...61e0398cc366a5

Ciao, Michael.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Emile van Sebille | last post by:
QOTW: "Have you ever used the copy module? I am *not* a beginner, and have used it *once* (and I can't remember what for, either)." -- Michael Hudson "It will likely take a little practice...
0
by: Emile van Sebille | last post by:
QOTW (advanced interfaces track): "I'm firmly in favour of any language that can DWIMNWIS." -- Tim Delaney QOTW (MS roadkill track): "Underestimate MS at your own risk. It is one thing to not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.