hi, everyone,someone can help me? i want use ldap ...
# troubleshoot
a
hi, everyone,someone can help me? i want use ldap to login,but Failed to log in! Invalid Credentials
Copy code
WHZ-Authentication {
  com.sun.security.auth.module.LdapLoginModule sufficient
  java.naming.security.authentication="simple"
  userProvider="<ldap://192.168.3.75:389>"
  authIdentity="cn={USERNAME},dc=lenovoedu,dc=cn"
  userFilter="(&(objectClass=inetOrgPerson)(uid={USERNAME}))"
  debug="true"
  useSSL="false";
};
b
Hey @ambitious-notebook-45027, Could you give me a bit of a context: • where would like to login with ldap? • Where do you see/ set the
WHZ..
snippet?
a
i change my config
Copy code
WHZ-Authentication {
  com.sun.security.auth.module.LdapLoginModule sufficient
  userProvider="<ldap://192.168.3.75:389/cn=demo,dc=lenovoedu,dc=cn>"
  java.naming.security.principal="cn=demo,dc=lenovoedu,dc=cn"
  userFilter="uid={USERNAME}"
  java.naming.security.credentials="demo"
  java.naming.security.authentication="simple"
  debug="true"
  useSSL="false";
};
but i cannot bind my account
b
where are you seeting these configs? and where are you trying to login?
a
i change from https://datahubproject.io/docs/datahub-web-react and i try it in datahub
i can bind by admin , aslo can serarch user , but bind by login username is fail
Copy code
WHZ-Authentication {
  com.sun.security.auth.module.LdapLoginModule sufficient
  userProvider="<ldap://192.168.3.75:389/dc=lenovoedu,dc=cn>"
  java.naming.security.principal="cn=admin,dc=lenovoedu,dc=cn"
  userFilter="uid={USERNAME}"
  java.naming.security.credentials="123456"
  java.naming.security.authentication="simple"
  debug="true"
  useSSL="false";
};
Copy code
63d794bc conn=1863 fd=15 ACCEPT from IP=192.168.3.72:50499 (IP=0.0.0.0:389)
63d794bc conn=1863 op=0 BIND dn="cn=admin,dc=lenovoedu,dc=cn" method=128
63d794bc conn=1863 op=0 BIND dn="cn=admin,dc=lenovoedu,dc=cn" mech=SIMPLE ssf=0
63d794bc conn=1863 op=0 RESULT tag=97 err=0 text=
63d794bc conn=1863 op=1 SRCH base="dc=lenovoedu,dc=cn" scope=2 deref=3 filter="(uid=demo)"
63d794bc conn=1863 op=1 SRCH attr=1.1
63d794bc conn=1863 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
63d794bc conn=1863 op=2 BIND anonymous mech=implicit ssf=0
63d794bc conn=1863 op=2 BIND dn="cn=demo,dc=lenovoedu,dc=cn" method=128
63d794bc conn=1863 op=2 RESULT tag=97 err=49 text=
63d794bc conn=1863 op=3 UNBIND
63d794bc conn=1863 fd=15 closed
b