谁能告诉我是否可以使用 ldapsearch、ldapadd、ldapdelete 等实用程序查询 Active Directory 服务器?
最佳答案
简短的回答是"is"。用于查询 Active Directory 服务器的示例 ldapsearch 命令如下:
ldapsearch \
-x -h ldapserver.mydomain.example \
-D "mywindowsuser@mydomain.example" \
-W \
-b "cn=users,dc=mydomain,dc=com" \
-s sub "(cn=*)" cn mail sn
这将以用户 mywindowsuser@domain.example
的身份连接到主机名为 ldapserver.mydomain.example
的 AD 服务器,提示在命令行上输入密码并显示名称以及 cn=users,dc=mydomain,dc=com
子树中用户的电子邮件详细信息。
参见Managing LDAP from the Command Line on Linux获取更多 sample 。请参阅LDAP Query Basics有关使用 LDAP 查询和 Active Directory 的示例的 Microsoft Exchange 文档。
关于active-directory - 从命令行使用 ldapsearch 查询 Windows Active Directory 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22224465/