将系统与 Active Directory (AD) 连接

Connect a system with Active Directory (AD)

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

错误:

'ldap_search(): Search: Bad search filter' in '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';

日志

> 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))

如果要限制可用于身份验证的条目,则必须为 $g_ldap_organization 输入有效的搜索过滤器。您很可能希望将此变量留空。