簡體   English   中英

使用“com.sun.jndi.ldap.LdapCtxFactory”的LDAP身份驗證中SECURITY_PRINCIPAL的正確格式是什么

[英]What is the correct format for SECURITY_PRINCIPAL in LDAP authentication using "com.sun.jndi.ldap.LdapCtxFactory"

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://xxx.xxx.xxx.xx:xxx");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "CN=username");
env.put(Context.SECURITY_CREDENTIALS, pwd);
env.put(Context.REFERRAL,"follow"); 

我只需要搜索特定域中的“CN”。 嘗試了上述方式和多種格式,但最終出現錯誤“LDAP 錯誤代碼 49 AcceptSecurityContext 錯誤數據 52e v2580”。 請有人幫我解決這個問題。

不確定我們在您的問題陳述中缺少什么。

LDAP 錯誤代碼 49 AcceptSecurityContext 錯誤數據 52e 當用戶名有效但密碼/憑據無效時返回。

我們有幾個針對 Microsoft Active Directory 的 JNDI示例。

您應該告訴我們您嘗試過的內容並顯示日志或結果並閱讀: https : //stackoverflow.com/help/how-to-ask

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM