使用Active Directory(AD)连接系统

时间:2017-02-10 11:42:56

标签: php active-directory ldap mantis

我按照所有说明将Mantis连接到AD,直到我在AD中创建了一个特定用户,即使这样我也无法连接这两个用于AD身份验证。

错误:

  

'ldap_search():搜索:错误的搜索过滤器'   'C:\ inetpub \ wwwroot \ mantisbt-2.0.0 \ core \ ldap_api.php'line 335

Original instructions from the developer site

我的设置:

$g_login_method = LDAP;
$g_ldap_server = 'ldap://IP_Server:389';  
$g_ldap_root_dn = 'dc=company,dc=technology'; 
$g_ldap_organization = 'company technology';
$g_ldap_protocol_version = 3; 
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_realname_field = 'cn';
$g_use_ldap_realname = ON; 
$g_use_ldap_email = ON;
$g_ldap_bind_dn =  'mantis'; //User AD
$g_ldap_bind_passwd = '*******'; //Password AD
$g_ldap_follow_referrals = ON;
$g_log_level = LOG_LDAP;
$g_log_destination = 'file:C:\mantisbt.log';

LOG

> ldap_api.php:326 ldap_authenticate_by_username() Binding to LDAP
> server ldap_api.php:63 ldap_connect_bind() Attempting connection to
> LDAP server/URI 'ldap://IP_Server:389'. ldap_api.php:66
> ldap_connect_bind() Connection accepted by LDAP server ldap_api.php:79
> ldap_connect_bind() Setting LDAP protocol version to 3
> ldap_api.php:101 ldap_connect_bind() Attempting bind to ldap server
> with username and password ldap_api.php:114 ldap_connect_bind() Bind
> to ldap server successful ldap_api.php:334
> ldap_authenticate_by_username() Searching for (&company technology(sAMAccountName=paulo.roberto))

1 个答案:

答案 0 :(得分:1)

如果要限制可用于身份验证的条目,则必须为$ g_ldap_organization输入有效的搜索过滤器。很可能你想把这个变量留空。

相关问题