Caught LDAPError while authenticating

1,986 views
Skip to first unread message

Jeffield

unread,
Oct 8, 2011, 11:25:16 PM10/8/11
to django-auth-ldap
I just configured up to use the django-auth-ldap module and its not
working. ( well something's not)

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
Django version 1.3.1
python-django-auth-ldap 1.0.5-1
python-ldap-2.3.11-1ubuntu2

Talking to a Active Directory server that I dont administer ( so I may
need to get a bit more details there)
-------------------------- my run -------------------
$ ./manage.py runserver 0.0.0.0:8000
Validating models...

0 errors found
Django version 1.3.1, using settings
'logging_auth_prototype2.settings'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Initiating TLS
Initiating TLS
Caught LDAPError while authenticating jds: CONNECT_ERROR({'info':
'(unknown error code)', 'desc': 'Connect error'},)
Caught LDAPError while authenticating jds: CONNECT_ERROR({'info':
'(unknown error code)', 'desc': 'Connect error'},)
[08/Oct/2011 22:17:04] "POST /admin/ HTTP/1.1" 200 2162
----------------------------------------------------------------
My Config
-----------------------------------------------------------
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
AUTH_LDAP_SERVER_URI = "ldap://servername.company.com"

#AUTH_LDAP_USER_DN_TEMPLATE = "uid=%
(user)s,cn=users,dc=company,dc=com"
AUTH_LDAP_START_TLS = True

AUTH_LDAP_GLOBAL_OPTIONS = {
ldap.OPT_REFERRALS: 0,
}
-----------------------------------------------------------
Thoughts..? ( note: I wrote a stand alone program that used python-
ldap
and got a host of other issues going on, which is where I found the
OPT_REFERRALS option from.

Thanks,
Jeff Sheffield

Peter Sagerson

unread,
Oct 9, 2011, 1:17:17 PM10/9/11
to django-a...@googlegroups.com
The error says that it can't connect, suggesting that either the URL is incorrect or you can't connect anonymously. You may need to set AUTH_LDAP_BIND_DN and AUTH_LDAP_BIND_PASSWORD. Exploring the server through raw python-ldap is a good call. It's also easy to diagnose connection parameters from an interactive Python shell.

Jeff Schroeder

unread,
Oct 9, 2011, 4:11:20 PM10/9/11
to django-a...@googlegroups.com, django-a...@googlegroups.com
Active Directory (by default) disallows anonymous binds.

Sent from my iPhone

Jeffield

unread,
Oct 10, 2011, 8:00:42 PM10/10/11
to django-auth-ldap
not using anonymous binds made things start working.
i.e. setting a valid user to do the searching
AUTH_LDAP_BIND_DN = "us...@company.com"
&& AUTH_LDAP_BIND_DN = "booya"

Thanks guys!
Jeff

On Oct 9, 3:11 pm, Jeff Schroeder <jeffschr...@gmail.com> wrote:
> Active Directory (by default) disallows anonymous binds.
>
> Sent from my iPhone
>
> On Oct 9, 2011, at 10:17, Peter Sagerson <psag...@ignorare.net> wrote:
>
>
>
>
>
>
>
> > The error says that it can't connect, suggesting that either the URL is incorrect or you can't connect anonymously. You may need to set AUTH_LDAP_BIND_DN and AUTH_LDAP_BIND_PASSWORD. Exploring the server through raw python-ldap is a good call. It's also easy to diagnose connection parameters from an interactive Python shell.
>
> > On Oct 8, 2011, at 8:25 PM, Jeffield wrote:
>
> >> I just configured up to use the django-auth-ldap module and its not
> >> working. ( well something's not)
>
> >> Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
> >> Django version 1.3.1
> >> python-django-auth-ldap 1.0.5-1
> >> python-ldap-2.3.11-1ubuntu2
>
> >> Talking to a Active Directory server that I dont administer ( so I may
> >> need to get a bit more details there)
> >> -------------------------- my run -------------------
> >> $ ./manage.py runserver 0.0.0.0:8000
> >> Validating models...
>
> >> 0 errors found
> >> Django version 1.3.1, using settings
> >> 'logging_auth_prototype2.settings'
> >> Development server is running athttp://0.0.0.0:8000/

Di majo

unread,
May 12, 2024, 3:20:53 PM5/12/24
to django-auth-ldap
MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
LOAN DEAL
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
IPIP/DTC
SLBC PROVIDER
CREDIT CARD TOP UP
DUMPS/ PINS
SEPA TRANSFER
WIRE TRANSFER
BITCOIN TOP UP
GLOBALPAY INC US
SKRILL USA
UNIONPAY RECEIVER

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP
+44 7529 555638
Reply all
Reply to author
Forward
0 new messages