我正在尝试将bhLDAPAuthPlugin设置为通过Active Directory进行身份验证。我在配置身份验证设置时遇到问题。
在adLDAP.php文件中,默认设置如下:
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应该是我要连接的域,但我找到了其他文档,列出了特定的参数,如组织:
account_suffix = "ou=People, o=domain.edu";我如何找到要使用的?
发布于 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。
https://stackoverflow.com/questions/13961374
复制相似问题