简体   繁体   English

LDAP:错误代码 49 - 80090308:LdapErr:DSID-0C09044E,注释:AcceptSecurityContext 错误,数据 52e,v2580(第一次使用 ldap)

[英]LDAP: error code 49 - 80090308: LdapErr: DSID-0C09044E, comment: AcceptSecurityContext error, data 52e, v2580 (first time using ldap)

I am having problem with ldap on spring, I know what that error means but idk what i am doing wrong in the config of the connection我在 spring 上遇到 ldap 问题,我知道那个错误是什么意思,但我知道我在连接配置中做错了什么

this is my application.properties:这是我的应用程序。属性:

spring.ldap.urls=ldap://***
spring.ldap.base=OU=Account,DC=company,DC=lan
spring.ldap.username=CN=Intranet company
spring.ldap.password=pswd

The password are good and username too but maybe my base is false?密码和用户名都很好,但也许我的基础是假的? can anyone help me plz?谁能帮我吗?

and here is what i try to do这是我尝试做的

@Autowired
private LdapTemplate ldapTemplate;
System.out.println( ldapTemplate.search(
        "OU=Account,DC=company,DC=lan",
        "cn=" + account.username ,
                (AttributesMapper<String>) attrs -> (String) attrs.get("sAMAccountName").get()));

I just try to connect to the active directory and discover how it works我只是尝试连接到活动目录并发现它是如何工作的

The error message makes it clear that you're using Active Directory.错误消息清楚地表明您正在使用 Active Directory。 So I'm pretty sure this is the problem:所以我很确定这是问题所在:

spring.ldap.username=CN=Intranet company

I don't think Active Directory likes that format for the username.我认为 Active Directory 不喜欢这种用户名格式。 It either has to be:它要么必须是:

  • The full DN ( CN=Intranet company,OU=Account,DC=company,DC=lan ), or完整的 DN ( CN=Intranet company,OU=Account,DC=company,DC=lan ),或者
  • The plain username ( sAMAccountName attribute), or普通用户名( sAMAccountName属性),或
  • DOMAIN\username if the user is not on the domain you're connecting to, or DOMAIN\username如果用户不在您要连接的域中,或者
  • The userPrincipalName (eg username@company.lan ). userPrincipalName (例如username@company.lan )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 LDAP:错误代码 49 - 80090308:LdapErr:DSID-0C090446,注释:AcceptSecurityContext 错误,数据 52e,v2580 - 使用 Spring 工具 - LDAP: error code 49 - 80090308: LdapErr: DSID-0C090446, comment: AcceptSecurityContext error, data 52e, v2580 - using Spring tools LDAP:错误代码49 - 80090308:LdapErr:DSID-0C09042F,注释:AcceptSecurityContext错误,数据52e,v2580 - LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580 LDAP 错误代码 49 AcceptSecurityContext 错误数据 52e v2580 即使凭据正确 - LDAP error code 49 AcceptSecurityContext error data 52e v2580 even with the correct credentials 身份验证请求失败:凭据错误[LDAP:错误代码49-数据52e,v1db1] - Authentication request failed: Bad credentials [LDAP: error code 49 - data 52e, v1db1] LDAP + Java Aplication身份验证错误代码49-52e - LDAP + Java Aplication Authentication error code 49 - 52e JAVA LDAP错误javax.naming.NamingException:[LDAP:错误代码1-000004DC:LdapErr:DSID-0C09075A - JAVA LDAP ERROR javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C09075A 使用 ldap 时出现 AcceptSecurityContext 错误 - AcceptSecurityContext error when using ldap Java应用程序中带有jndi的身份验证错误49 52e-无效令牌 - Authentication error 49 52e with jndi in a java application- invalid token [LDAP:错误代码 32 - 0000208D:NameErr:DSID-03100241,问题 2001 (NO_OBJECT),数据 0,最佳匹配: - [LDAP: error code 32 - 0000208D: NameErr: DSID-03100241, problem 2001 (NO_OBJECT), data 0, best match of: Spring boot ldap 身份验证错误 [LDAP: 错误代码 49 - 凭据无效] - Spring boot ldap Authentication Error [LDAP: error code 49 - Invalid Credentials]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM