question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LDAPBindError: automatic bind not successful - invalidCredentials

See original GitHub issue

The plugin appears to be configured correctly but not accepting my password.

Here is the debug trace:

[D 2018-08-23 14:29:23.985 JupyterHub ldapauthenticator:299] TYPE= 'False'
[D 2018-08-23 14:29:23.985 JupyterHub ldapauthenticator:223] Looking up user with search_base=OU=Faculty,DC=campus,DC=SCHOOL,DC=CA, search_filter='(sAMAccountName=username)', attributes=sAMAccountName
[D 2018-08-23 14:29:24.374 JupyterHub ldapauthenticator:278] Attempting to bind username with [CN=cn_username,OU=Users,OU=Faculty,DC=campus,DC=SCHOOL,DC=CA]
[D 2018-08-23 14:29:24.386 JupyterHub ldapauthenticator:333] Status of user bind username with [CN=cn_username,OU=Users,OU=Faculty,DC=campus,DC=SCHOOL,DC=CA] : False
    LDAPBindError: automatic bind not successful - invalidCredentials
[W 2018-08-23 14:29:24.386 JupyterHub ldapauthenticator:379] Invalid password for user username
[W 2018-08-23 14:29:24.387 JupyterHub base:351] Failed login for username
[I 2018-08-23 14:29:24.389 JupyterHub log:122] 200 POST /hub/login?next= (@132.xx.xx.xx) 404.97ms
[D 2018-08-23 14:29:24.789 JupyterHub log:122] 304 GET /favicon.ico (@132.xx.xx.xx) 1.37ms

Here are my settings:

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_address = 'ldaps://my.jupyterhub.edu'
c.LDAPAuthenticator.use_ssl = True
c.LDAPAuthenticator.server_port = 636
c.LDAPAuthenticator.bind_dn_template = ["CN={username},OU=Faculty,DC=campus,DC=niceschool,DC=edu"]
c.LDAPAuthenticator.escape_userdn = False
c.LDAPAuthenticator.user_search_base = 'OU=Faculty,DC=campus,DC=niceschool,DC=edu'
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.user_attribute = 'sAMAccountName'
c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})'
c.LDAPAuthenticator.lookup_dn_search_user = 'loginname'
c.LDAPAuthenticator.lookup_dn_search_password = 'secret'
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'sAMAccountName'

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:14

github_iconTop GitHub Comments

4reactions
healinyooncommented, Feb 11, 2019

Here are my settings: ## LDAP c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator' c.LDAPAuthenticator.server_address = 'ldap://ldcc.co.kr' c.LDAPAuthenticator.server_port = 389 c.LDAPAuthenticator.bind_dn_template = ["cn={username},dc=ldcc,dc=co,dc=kr"] c.LDAPAuthenticator.valid_username_regex = '^[a-zA-Z_][@.a-zA-Z0-9_-]*$' c.LDAPAuthenticator.lookup_dn = True c.LDAPAuthenticator.use_ssl = False c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})' c.LDAPAuthenticator.lookup_dn_search_user = 'loginid' c.LDAPAuthenticator.lookup_dn_search_password = 'loginpasswd' c.LDAPAuthenticator.user_search_base = 'dc=ldcc,dc=co,dc=kr' c.LDAPAuthenticator.user_attribute = 'sAMAccountName' c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn' c .LDAPAuthenticator.escape_userdn = False

Here are debug: [D 2019-02-11 10:49:32.046 JupyterHub ldapauthenticator:299] TYPE= 'True' [D 2019-02-11 10:49:32.047 JupyterHub ldapauthenticator:223] Looking up user with search_base=dc=ldcc,dc=co,dc=kr, search_filter='(sAMAccountName=healin23)', attributes=sAMAccountName [D 2019-02-11 10:49:32.624 JupyterHub ldapauthenticator:278] Attempting to bind healin23 with cn=healin23,dc=ldcc,dc=co,dc=kr [D 2019-02-11 10:49:32.629 JupyterHub ldapauthenticator:333] Status of user bind healin23 with cn=healin23,dc=ldcc,dc=co,dc=kr : False LDAPBindError: automatic bind not successful - invalidCredentials [W 2019-02-11 10:49:32.629 JupyterHub ldapauthenticator:379] Invalid password for user healin23 [W 2019-02-11 10:49:32.630 JupyterHub base:504] Failed login for healin23

I have tried all that I can. Please help me.

2reactions
wbchncommented, Nov 13, 2018

I met the issue and solve with fix my c.LDAPAuthenticator.bind_dn_template configuration.

The bind code here :

        for dn in bind_dn_template:
...
            userdn = dn.format(username=username)
...
            try:
                conn = self.get_connection(userdn, password)

the userdn will renderbind_dn_template with username.

@tedstrauss, I think the user: username which full dn is CN=username,OU=Faculty,DC=campus,DC=niceschool,DC=edu, could not login and got bind failed, will get Invalid password for user '{username}' issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ldap3 bind failed when CN and DisplayName are different
LDAPBindError : automatic bind not successful - invalidCredentials >>> c.extend.standard.who_am_i() Traceback (most recent call last): File ...
Read more >
Unable to use LDAP authentication Plugin - JupyterHub
ldap3.core.exceptions.LDAPBindError: automatic bind not successful - invalidCredentials. I tried to follow official documentation but no ...
Read more >
LDAP module don't work correct - vulnerable to burglary
LdapAuthenticationProvider'>: ('LdapAuthenticationProvider', LDAPBindError('automatic bind not successful - invalidCredentials',)) ...
Read more >
Developers - LDAPBindError: automatic bind not successful
LDAPBindError : automatic bind not successful - invalidCredentials. jupyter. 23 August 2018 Posted by tedstrauss. The plugin appears to be configured ...
Read more >
Resolve a Bind Error in Active Directory Authentication
If you have problems with user authentication through your Active Directory server and find the message LDAP binding not successful in your log...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found