[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAPBindError: automatic bind not successful - invalidCredentials #101

Open
ted-strauss-K1 opened this issue Aug 23, 2018 · 14 comments
Open

Comments

@ted-strauss-K1
Copy link

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'
@kalaytan
Copy link

Having the same issue. Can anyone point anywhere?

@dhirschfeld
Copy link
Collaborator

If you use the full DN for the lookup_dn_search_user rather than the samid does it work?

@wbchn
Copy link
wbchn commented 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.

@healinyoon
Copy link

Hi.
I have same issue that print error message "Invaild password for user **"
I couldn't understand how can you solve the problem.

Can you see me your bind_dn_template and user_search_base code so that I can fix my problem?
Thank you.

@mannevijayakrishna
Copy link

Hi.
I have same issue that print error message "Invaild password for user **"
I couldn't understand how can you solve the problem.

Can you see me your bind_dn_template and user_search_base code so that I can fix my problem?
Thank you.

please have a look into the documentation once again by step by step or show us some log and your configuration. maybe we will point you where the actual issue.

@dhirschfeld
Copy link
Collaborator

#116 might help you determine the correct config

@healinyoon
Copy link
healinyoon commented 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.

@sven-mayer
Copy link

@tedstrauss you used the pip install which is different from this repo.
use pip3 install git+https://github.com/jupyterhub/ldapauthenticator/
to get the latest version.

@poomjuntara
Copy link

I already have install newest version of ldapauthenticator ,
but it dosen't work.

[I 2019-04-02 16:12:02.737 JupyterHub log:100] 302 GET /login (@10.31.13.101) 0.63ms
[D 2019-04-02 16:12:02.752 JupyterHub log:100] 304 GET /hub/login (@10.31.13.101) 1.51ms
[D 2019-04-02 16:12:15.589 JupyterHub ldapauthenticator:299] TYPE= 'False'
[D 2019-04-02 16:12:15.590 JupyterHub ldapauthenticator:223] Looking up {user} with search_base=OU=Bussiness Units,DC=company,DC=co,DC=th, search_filter='(sAMAccountName={user})', attributes=sAMAccountName
[D 2019-04-02 16:12:15.700 JupyterHub ldapauthenticator:278] Attempting to bind {user} with CN={bind_user},OU=Services Account,OU=Bussiness Units,DC=company,DC=co,DC=th
[D 2019-04-02 16:12:15.760 JupyterHub ldapauthenticator:333] Status of user bind {user} with CN={bind_user},OU=Services Account,OU=Bussiness Units,DC=company,DC=co,DC=th : False
LDAPBindError: automatic bind not successful - invalidCredentials
[W 2019-04-02 16:12:15.760 JupyterHub ldapauthenticator:379] Invalid password for user {user}
[D 2019-04-02 16:12:15.760 JupyterHub login:95] Failed login for {user}
[I 2019-04-02 16:12:15.764 JupyterHub log:100] 200 POST /hub/login?next= (@10.31.13.101) 172.90ms

@Krasnovidov
Copy link

#101 (comment)

I already have install newest version of ldapauthenticator ,
but it dosen't work.

[I 2019-04-02 16:12:02.737 JupyterHub log:100] 302 GET /login (@10.31.13.101) 0.63ms
[D 2019-04-02 16:12:02.752 JupyterHub log:100] 304 GET /hub/login (@10.31.13.101) 1.51ms
[D 2019-04-02 16:12:15.589 JupyterHub ldapauthenticator:299] TYPE= 'False'
[D 2019-04-02 16:12:15.590 JupyterHub ldapauthenticator:223] Looking up {user} with search_base=OU=Bussiness Units,DC=company,DC=co,DC=th, search_filter='(sAMAccountName={user})', attributes=sAMAccountName
[D 2019-04-02 16:12:15.700 JupyterHub ldapauthenticator:278] Attempting to bind {user} with CN={bind_user},OU=Services Account,OU=Bussiness Units,DC=company,DC=co,DC=th
[D 2019-04-02 16:12:15.760 JupyterHub ldapauthenticator:333] Status of user bind {user} with CN={bind_user},OU=Services Account,OU=Bussiness Units,DC=company,DC=co,DC=th : False
LDAPBindError: automatic bind not successful - invalidCredentials
[W 2019-04-02 16:12:15.760 JupyterHub ldapauthenticator:379] Invalid password for user {user}
[D 2019-04-02 16:12:15.760 JupyterHub login:95] Failed login for {user}
[I 2019-04-02 16:12:15.764 JupyterHub log:100] 200 POST /hub/login?next= (@10.31.13.101) 172.90ms

You managed to fix the problem?

@dmpe
Copy link
dmpe commented Aug 1, 2019

Facing exactly same problem...

@80O
Copy link
80O commented Sep 10, 2019

I've configured it using the basic configuration but I receive the same error:

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_address = 'dc12r2n1.company.local'
c.LDAPAuthenticator.bind_dn_template = 'sAMAccountName={username},ou=Development,ou=company Users,dc=company,dc=local'

Results:

Status of user bind mydomainname with sAMAccountName=mydomainname,ou=Development,ou=company Users,dc=company,dc=local : False
    LDAPBindError: automatic bind not successful - invalidCredentials

Using the Active Directory Explorer I can browse the Active Directory without having to enter any username / password so I figured this basic connection should work according to the documentation?

Okay this worked for me:

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_address = 'ldap://dc12r2n1.company.local'
c.LDAPAuthenticator.bind_dn_template = 'company\{username}'
c.LDAPAuthenticator.lookup_dn = False
c.LDAPAuthenticator.user_search_base = 'OU=Development,OU=Company Users,DC=company,DC=local'
c.LDAPAuthenticator.user_attribute = 'sAMAccountName'
c.LDAPAuthenticator.allowed_groups = []

@wslee4859
Copy link

Has this problem been resolved?

@gulshan1040
Copy link

I am also facing the same issue, please let us know if there's is any solution or workaround to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests