我无法让phpBB通过我们的Active Directory进行身份验证
时间:2020-03-05 18:46:54 来源:igfitidea点击:
我非常确定我使用的设置正确,因此所有可能出现的情况都可能是错误的,我应该检查一下,以便使Active Directory进行身份验证。
解决方案
回答
尝试测试PHP是否可以连接到活动目录
<?php $ds = ldap_connect('host.ad.lan', 389); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_bind($ds, '[email protected]', 'xxx'); $sr = ldap_search($ds, 'CN=Cameron Zemek,OU=Users,OU=BRC,DC=ad,DC=lan', '(objectclass=*)', array('cn')); $entryID = ldap_first_entry($ds, $sr); $data = ldap_get_attributes($ds, $entryID); print_r($data); ldap_close($ds);
$ config ['ldap_user']和$ config ['ldap_uid']有什么?我们想要将$ config ['ldap_uid']设置为sAMAccountName
回答
@grom ...谢谢,但是,是的,PHP运行正常。我在同一台服务器上安装了WordPress和MediaWiki,它们都可以针对同一活动目录进行身份验证。