linux - 是否可以从 linux 机器查询 windows ldap 服务器

标签 linux active-directory ldap openldap

<分区>

我正在尝试从 CentOS 5.8 机器查询 Windows LDAP 服务器。这是可以做到的吗?具体来说,我尝试使用“ldapsearch”查询 LDAP 服务器。这是查询:

ldapsearch -V -h ldapserver.host.name -b 'YourADDN' -x -s base -z 1 -l 1 '(&(objectCategory=Person)(objectClass=user)(sAMAccountName=username))' @inetOrgPerson

根据我的结果,我什至不确定是否可以从 Linux 客户端连接到 Windows LDAP 服务器。如果有人可以验证这一点,我将不胜感激。我想要做的就是运行 LDAP 查询 (&(objectCategory=Person)(objectClass=user)(sAMAccountName=username)) 从 Linux 机器到 LDAP 服务器并将结果返回到 Linux 服务器屏幕。

最佳答案

ldapsearch -b "dc=example,dc=com" -D "xxx\user1" -x -W -h x.x.x.x -p 3268 "(&(objectClass=user)(objectCategory=person)(sAMAccountName=username))"

关于linux - 是否可以从 linux 机器查询 windows ldap 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18813114/

相关文章:

.net - 断开连接时使用 .Net 对 Active Directory 进行身份验证

powershell - 用Powershell add-adgroupmember结束

linux - 排序命令中空格的处理。 LC_COLLATE=c 和 LC_COLLATE ="en_US.UTF-8"之间的区别

c++ - 链接器选项 -Bsymbolic

linux - 如果否则用 rm Shell linux

ruby-on-rails - 使用 LDAP 和本地数据库进行 Rails 身份验证

java - LDAP 查询 URL - 如何引用属性?

perl - 如何从 Perl 重置我的 LDAP 密码?

ruby-on-rails - 使用 LDAP 进行 Rails 身份验证

linux - 重命名文件夹中的所有文件