我有一些问题。
列出的错误:
LDAP error code 8
服务器日志:
javax.naming.AuthenticationNotSupportedException: [LDAP: error code 8 - 00002028: LdapErr: DSID-0C090202, comment: The server requires binds to turn on integrity checking if SSLTLS are not already active on the connection, data 0, v2580 ]
问题操作(?(:
客户端到登录请求到服务器。服务器将请求发送到 LDAP。有些人可以成功登录,但有些人登录失败:
LDAP 响应错误代码 8
服务器日志得到 [javax.nameing.AuthenticationNotSupportedException: [LDAP: 错误代码 8 - 00002028: LdapErr: DSID-0C090202, 注释: 如果 SSL\TLS 在连接上尚未处于活动状态,则服务器需要绑定才能打开完整性检查,数据 0, v2580 ]]
但是我正在使用LDAP。 没有LDAPS。
- 有人说检查下
KRDOM01 : HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services NTDS Parameters LDAPServerIntegrity = 1
但我的设置已经LDAPServerIntegrity = 1
我的代码:
Hashtable<String, Object> env = new Hashtable<String, Object>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://"+host+":"+port);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, principal);
env.put(Context.SECURITY_CREDENTIALS, pwd);
为什么有些人登录没问题,有些人却失败了?
这些错误表示您的 LDAP 服务器已设置为"需要签名"。
如果使用 SSL 进行连接,则不需要数据签名4
。如果您能够成功绑定,那么我会"猜测"您首次连接到的服务器没有启用签名,并且您被引用到启用了签名的域控制器。
看:https://support.microsoft.com/en-us/help/2545140/fast-esp-unable-to-use-active-directory-accounts-for-authentication-login-fails-with-ldaperr-dsid-0c0901fc