2009/2/19 João Olavo Baião de Vasconcelos <joaool...@gmail.com>: > On Wed, Feb 18, 2009 at 7:17 PM, Antoni Aloy <antoni.a...@gmail.com> wrote: >> >> This is a quite nice tutorial, perphaps it would help you. >> http://www.carthage.edu/webdev/?p=12 > > Thanks for the advice, Antoni. > > I tried authenticating with LDAP using the python interpreter, and I got > this error: > >>>> import ldap >>>> l = ldap.initialize('ldap://SERVER.DOMAIN.biz:389' >>>> l.simple_bind_s('USER', 'PASSWD') > Traceback (most recent call last): > File "<console>", line 1, in ? > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 176, in > simple_bind_s > return self.result(msgid,all=1,timeout=self.timeout) > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 405, in > result > res_type,res_data,res_msgid = self.result2(msgid,all,timeout) > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 409, in > result2 > res_type, res_data, res_msgid, srv_ctrls = > self.result3(msgid,all,timeout) > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 415, in > result3 > rtype, rdata, rmsgid, serverctrls = > self._ldap_call(self._l.result3,msgid,all,timeout) > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 94, in > _ldap_call > result = func(*args,**kwargs) > INVALID_CREDENTIALS: {'info': '80090308: LdapErr: DSID-0C090334, comment: > AcceptSecurityContext error, data 525, vece', 'desc': 'Invalid credentials'} > > I didn't find any help googleing for the error (DSID-0C090334). I'm using > simple_bind_s() as my LDAP server does not allow anonymous queries. (I also > tried using bind_s(), with my real LDAP user, but also didn't work). > > Do I have to setup anything else before do a simple_bind_s(), as the > ldap-group? > At least in our LDAP configuration, there are restrictions about the kind of queries that a user can do. So check also this. Use your account to see if you can log in, and try to run the function step by step inside the shell.
I you don't have restrictions on your LDAP the most commont issue is with the LDAP base tree. That is where the user tree resides in your organization. Use the step by step debugger to know if you can connect to LDAP and check if there is aproblem just with LDAP configurations. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---