我正在尝试使用UnboundID LDAP SDK将组添加到我的Active Directory服务,并不断收到错误503:将不执行.
我已经验证我正在使用SSL连接,并且我正在与属于Administrators组的用户进行连接,这是我错了 - 这使他有权创建新条目.
我还将LDAP接口事件的日志记录级别一直提高到5,并且事件查看器注册了许多事件,这些事件都没有用于解释服务不愿执行创建条目操作的原因.
关于什么可能导致这个问题的任何想法?
下面是我正在使用的scala代码的示例:
val connection = connect("MyAdminUser", "MyAdminPass")
val addGroupResult = connection.add("CN=TestGroup2,OU=Groups,OU=mydomain,DC=mydomain,DC=local",
new Attribute("objectClass", "top", "group"),
new Attribute("name","TestGroup2"),
new Attribute("sAMAccountName","TestGroup2"),
new Attribute("sAMAccountType","268435456"),
new Attribute("objectCategory","CN=Group,CN=Schema,CN=Configuration,DC=mydomain,DC=local"),
new Attribute("cn","TestGroup2"),
new Attribute("distinguishedName","CN=TestGroup2,OU=Groups,OU=mydomain,DC=mydomain,DC=local"),
new Attribute("instanceType","4"),
new Attribute("groupType","-2147483646")
)
private def connect(user: String, pass: String) = {
val options = new LDAPConnectionOptions()
options.setFollowReferrals(true)
val sslUtil = new SSLUtil(new TrustAllTrustManager())
val socketFactory = sslUtil.createSSLSocketFactory()
new LDAPConnection(socketFactory, options, host, securePort, DN(user), pass)
}
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误消息:
Exception in thread "main" LDAPException(resultCode=53 (unwilling to …Run Code Online (Sandbox Code Playgroud) 我正在构建一个应用程序,我需要使用它连接到Active Directory UnboundID.使用一个例子,我设法将用户与他们distinguishedName和password.
但是,我想仅使用domain和username它进行身份验证,类似于在Windows中完成的操作.使用名为JXplorer它的工具浏览AD 似乎sAMAccountName可能是我需要的属性.但是,distinguishedName使用sAMAccountName 替换会导致AcceptSecurityContext错误.使用"uid=..."示例中显示的语法也产生了相同的错误.
有没有办法只使用域登录,username/ sAMAccountName和password.或者我是否需要通过AD搜索并找到distinguishedName我想要进行身份验证的用户,然后使用他们distinguishedName和password?绑定连接?
我有一组基于 Spring LDAP 框架的旧自动化测试用例。它们连接到外部 LDAP 服务器。我正在考虑用嵌入式服务器替换外部服务器。UnboundID InMemoryDirectoryServer 看起来很有吸引力,特别是如果有一种方法允许基于 Spring LDAP 的客户端连接基于 UnboundID 的嵌入式服务器。问题是:怎么做?我是 LDAP 新手,请帮忙。
LDAP新手.我计划使用UnboundID Java API通过非常慢的链接检查LDAP服务器中是否存在~5K条目.一个是,我可以使用正确的LDAP搜索选项.或者通过绑定条目的DN来确定条目的存在.Plz建议,这是快速/最好的方式.
我被分配了一项任务,从 android 连接到 LDAP 服务器。从 android 执行身份验证过程。我正在使用 openLDAP。我对此完全陌生。任何人都可以帮我解决一些代码或演示代码,显示 android 与 LDAP 服务器连接并进行身份验证。这
Port no-389
SSL Port-636
IP Address-LGSPC3
username-->cn=name,cn=users,dc=mydeomain,dc=com
serverlist-ldap://server1
Run Code Online (Sandbox Code Playgroud)
先感谢您
我使用unboundid ldap sdk来执行ldap查询.我在运行ldap搜索查询时遇到了一个奇怪的问题.当我对包含50k条目的组运行查询时,我收到异常.我的例外:
LDAPException(resultCode=4 (size limit exceeded), errorMessage='size limit exceeded')
at com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPSearchResults.nextElement(LDAPSearchResults.java:254)
at com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPSearchResults.next(LDAPSearchResults.java:279)
Run Code Online (Sandbox Code Playgroud)
现在奇怪的是我已经在搜索约束中将maxResultSize设置为100k,而不是我收到此错误的原因?我的代码是
ld = new LDAPConnection();
ld.connect(ldapServer, 389);
LDAPSearchConstraints ldsc = new LDAPSearchConstraints();
ldsc.setMaxResults(100000);
ld.setSearchConstraints(ldsc);
Run Code Online (Sandbox Code Playgroud)
有人有什么想法吗?
我正在尝试测试 dnsmasq 和未绑定服务器。当我从机器“Y”执行 getaddrinfo() 请求时,我从 dnsmasq 服务器机器“X”获得 dns 查询响应。但是,当我通过关闭 dnsmasq 并在机器“X”上启动未绑定服务器从“Y”未绑定客户端的 API发送 dns 查询时,我看不到任何 dns 响应/解析。
我已经从源代码安装了未绑定的服务器,并解决了它对“X”上的 RHEL5 的依赖关系。
我在机器“X”上启动未绑定的服务器:
未绑定-c /usr/local/etc/unbound/unbound.conf
并且可以正常启动,没有任何错误。
unbound.conf 的配置是:
server:
verbosity: 1
## Specify the interface address to listen on:
interface: xxx.xxx.xxx.xxx
## To listen on all interfaces use:
# interface: 0.0.0.0
do-ip4: yes
do-ip6: yes
do-udp: yes
do-tcp: yes
do-daemonize: yes
access-control: 0.0.0.0/0 allow
## Other access control examples
#access-control: 192.168.1.0/24 action
## 'action' should be replaced by any one of: …Run Code Online (Sandbox Code Playgroud) java ×3
ldap ×3
linux ×2
android ×1
dns ×1
httpclient ×1
ldap-query ×1
openldap ×1
spring-ldap ×1