首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何查找LDAP的account_suffix

如何查找LDAP的account_suffix
EN

Stack Overflow用户
提问于 2012-12-20 05:19:40
回答 1查看 5.1K关注 0票数 2

我正在尝试将bhLDAPAuthPlugin设置为通过Active Directory进行身份验证。我在配置身份验证设置时遇到问题。

在adLDAP.php文件中,默认设置如下:

代码语言:javascript
复制
class adLDAP {
    // BEFORE YOU ASK A QUESTION, PLEASE READ THE DOCUMENTATION AND THE FAQ
    // http://adldap.sourceforge.net/documentation.php
    // http://adldap.sourceforge.net/faq.php

    // You can set your default variables here, or when you invoke the class
    var $_account_suffix="@mydomain.local";
    var $_base_dn = "DC=mydomain,DC=local"; 

    // An array of domain controllers. Specify multiple controllers if you 
    // would like the class to balance the LDAP queries amongst multiple servers
    var $_domain_controllers = array ("dc01.mydomain.local");

    // optional account with higher privileges for searching
    // not really that optional because you can't query much as a user
    var $_ad_username=NULL;
    var $_ad_password=NULL;

    // AD does not return the primary group. http://support.microsoft.com/?kbid=321360
    // This tweak will resolve the real primary group, but may be resource intensive. 
    // Setting to false will fudge "Domain Users" and is much faster. Keep in mind though that if
    // someone's primary group is NOT domain users, this is obviously going to bollocks the results
    var $_real_primarygroup=true;

    // Use SSL, your server needs to be setup, please see - http://adldap.sourceforge.net/ldap_ssl.php
    var $_use_ssl=false;

    // When querying group memberships, do it recursively
    // eg. User Fred is a member of Group A, which is a member of Group B, which is a member of Group C
    // user_ingroup("Fred","C") will returns true with this option turned on, false if turned off
    var $_recursive_groups=false;

    // You should not need to edit anything below this line
    //******************************************************************************************

这个问题可能看起来很抽象,但是我如何确定这个信息呢?

在插件的文档中,它说account_suffix应该是我要连接的域,但我找到了其他文档,列出了特定的参数,如组织:

代码语言:javascript
复制
account_suffix = "ou=People, o=domain.edu";

我如何找到要使用的?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-12-24 04:48:53

如果您有权访问Active Directory并拥有运行Active Directory用户和计算机的权限,则可以相当容易地解决这一问题。

首先,出于向后兼容性的原因,AD使用了“域”对象,它在LDAP中是dc=。所以后缀可能是dc=domain、dc=com或类似的形式。

您的AD管理员可能已经选择将用户留在默认的users容器中,该容器实际上是cn=Users,而不是您可能预期的ou=Users。

或者他们制作了一系列的OU用于用户存储。完全由他们决定。

在ADUC中,您可以看到将域名放在最顶部作为最高根节点的布局。这将是domain.com或类似的,这意味着在一端的dc=domain,dc=com。

然后查看用户的存储位置(或者至少是您希望使用此服务的用户),然后为每个OU添加一个ou=whatever到dc=domain dc=com。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13961374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档