Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'password)': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:skip:a 10': 0.09; 'all).': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:python': 0.16; 'fit': 0.20; '(the': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'skip:l 30': 0.24; 'pass': 0.26; 'skip:" 20': 0.27; 'header:X-Complaints-To:1': 0.27; 'specified': 0.30; '"",': 0.31; '(maybe': 0.31; 'credentials': 0.31; 'writes:': 0.31; 'file': 0.32; '(e.g.': 0.33; '(most': 0.33; 'subject:with': 0.35; 'skip:s 30': 0.35; 'accessing': 0.36; 'skip:" 50': 0.36; 'charset:us- ascii': 0.36; 'server': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:217': 0.63; 'due': 0.66; 'invalid': 0.68; 'forgotten': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: dieter Subject: Re: authentication with python-ldap Date: Sat, 25 May 2013 08:01:01 +0200 References: <20130523163621.Horde.5xisTMkLBHdRnqf13O6lQRA@correo.grm.uci.cu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gmane-NNTP-Posting-Host: pd9e0a2f9.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) Cancel-Lock: sha1:lVK3imGYTDjjYoRW7u9jPEv+5m8= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369461674 news.xs4all.nl 15986 [2001:888:2000:d::a6]:41546 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45969 avazquezr@grm.uci.cu writes: > import ldap > conn = ldap.initialize("ldap://ldap.uci.cu") > conn.protocol_version = ldap.VERSION3 > conn.simple_bind_s( "uid=xxx,dc=uci,dc=cu", "xxx" ) > > Result: > > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line > 207, in simple_bind_s > return self.result(msgid,all=1,timeout=self.timeout) > File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line > 422, in result > res_type,res_data,res_msgid = self.result2(msgid,all,timeout) > File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line > 426, in result2 > res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout) > File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line > 432, in result3 > ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout) > File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line > 96, in _ldap_call > result = func(*args,**kwargs) > INVALID_CREDENTIALS: {'desc': 'Invalid credentials'} You are accessing a protected operation of the LDAP server and it (the server) rejects it due to invalid credentials. You may have forgotten to pass on credentials (e.g. a password) or the credentials do not fit to the specified user (maybe the user does not exist at all).