dsorecdf78171 2017-05-23 10:59
浏览 28
已采纳

什么是我的Active Directory杰出名称? 什么是我的LDAP树?

I'm trying to make auth calls connecting from php to an Active Directory server auth looks fine but I don't know what to put as ldap_search parameters.

dump of ldap_connect:

resource(4) of type (ldap link)

dump of ldap_bind:

bool(true)

dump of ldap_search:

resource(5) of type (ldap result)

dump of ldap_get_entries:

array(1) {
  ["count"]=>
  int(0)
}

I tried an endless number of permutation of this kind of parameters:

$ldap_dn = "CN=Users,DC=ad,DC=domain";

$ldap_filter = "(objectClass=*)";

but I'm not sure what exactly to put as DC= value in my specific case or O= or OU= or CN= or whatever, any help will be appreciated.

  • 写回答

1条回答 默认 最新

  • doutang7414 2017-05-23 11:19
    关注

    The base distinguished name is the base distinguished name you'd like to perform operations on. An example base DN would be DC=corp,DC=acme,DC=org.

    You can learn it from your active directory server manager.

    I also recommend you to use adLDAP Package

    It is a PHP class that provides LDAP authentication and integration with Active Directory.

    If one dc is not defined, then the package will try to find it automatically by querying your server. It's recommended to include it to limit queries executed per request. It has some custom functions that use PHP's defualt ones. Hence, using the package may make your work easier.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度