Kerberos and LDAP authentication

146 views
Skip to first unread message

Htet Naing Aung

unread,
Sep 11, 2017, 12:16:18 PM9/11/17
to django-auth-ldap
Hi,

Do I need to configure Kerberos when the LDAP backend authentication is used?

I have the following setup in Django:

AUTHENTICATION_BACKENDS = (
   
'django_auth_ldap.backend.LDAPBackend',
)
AUTH_LDAP_BIND_DN
= 'cn=admin,dc=example,dc=com'
AUTH_LDAP_BIND_PASSWORD
= secret
AUTH_LDAP_USER_DN_TEMPLATE
= 'uid=%(user)s,ou=users,dc=example,dc=com'
AUTH_USER_MODEL
= 'cldap.LDAPUser'

I have the DN "uid=test123,ou=users,dc=example,dc=com".

And I get this error when I try to log in from Django admin.

59b6b1b0 >>> dnPrettyNormal: <uid=test123,ou=users,dc=example,dc=com>
59b6b1b0 <<< dnPrettyNormal: <uid=test123,ou=users,dc=example,dc=com>, <uid=test123,ou=users,dc=example,dc=com>
59b6b1b0 do_bind: version=3 dn="uid=test123,ou=users,dc=example,dc=com" method=128
59b6b1b0 bdb_dn2entry("uid=test123,ou=users,dc=example,dc=com")
59b6b1b0 => hdb_dn2id("dc=example,dc=com")
59b6b1b0 <= hdb_dn2id: got id=0x95
59b6b1b0 => hdb_dn2id("ou=users,dc=example,dc=com")
59b6b1b0 <= hdb_dn2id: got id=0x98
59b6b1b0 => hdb_dn2id("uid=test123,ou=users,dc=example,dc=com")
59b6b1b0 <= hdb_dn2id: got id=0x9f
59b6b1b0 entry_decode: ""
59b6b1b0 <= entry_decode()
59b6b1b0 => hdb_search
59b6b1b0 bdb_dn2entry("cn=kerberoskdc,cn=config,dc=example,dc=com")
59b6b1b0 => hdb_dn2id("cn=config,dc=example,dc=com")
59b6b1b0 <= hdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30988)
59b6b1b0 entry_decode: ""
59b6b1b0 <= entry_decode()
59b6b1b0 send_ldap_result: conn=-1 op=0 p=0
59b6b1b0 Entry *odusers_copy_entry(Operation *): Unable to locate cn=kerberoskdc,cn=config,dc=example,dc=com (32)
59b6b1b0 odusers_copy_krbrealm: No entry associated with KerberosKDC cn=kerberoskdc,cn=config,dc=example,dc=com
59b6b1b0 odusers_krb_auth: could not retrieve krb realm while authing test123

If I don't need to setup Kerberos, what can I do to solve this problem?

Thank you

Peter Sagerson

unread,
Sep 11, 2017, 12:40:09 PM9/11/17
to django-a...@googlegroups.com
There are a number of ways that one might authenticate to an LDAP service; django-auth-ldap is designed to authenticate to backends using simple binds. I would start by opening a Python shell and attempting to bind to your server manually:

>>> import ldap
>>> conn = ldap.initialize('ldap://localhost')
>>> conn.simple_bind_s('uid=test123,ou=users,dc=example,dc=com', <password>)

If that doesn't work, then I imagine either your server isn't set up correctly or django-auth-ldap isn't what you need.

Thanks,
Peter



--
You received this message because you are subscribed to the Google Groups "django-auth-ldap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-auth-ld...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin

unread,
Sep 11, 2017, 11:25:20 PM9/11/17
to django-auth-ldap
Thank you very much, Peter. I guess there's something wrong with my LDAP configuration. 

Di majo

unread,
May 12, 2024, 4:46:13 AM5/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