<p>I am pretty sure that the settings that I am using are correct, so all possible things can be wrong which I should check out so that I can make authentication with our Active Directory work.</p>

[{'answer_id': 41247, 'author': 'grom', 'author_id': 486, 'author_profile': 'https://Stackoverflow.com/users/486', 'pm_score': 1, 'selected': False, 'text': "<p>Try test if PHP can connect to active directory</p>\n\n<pre><code>&lt;?php\n$ds = ldap_connect('host.ad.lan', 389);\nldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);\nldap_set_option($ds, LDAP_OPT_REFERRALS, 0);\nldap_bind($ds, 'admin@ad.lan', 'xxx');\n$sr = ldap_search($ds, 'CN=Cameron Zemek,OU=Users,OU=BRC,DC=ad,DC=lan', '(objectclass=*)', array('cn'));\n$entryID = ldap_first_entry($ds, $sr);\n$data = ldap_get_attributes($ds, $entryID);\nprint_r($data);\nldap_close($ds);\n</code></pre>\n\n<p>What do you have has your $config['ldap_user'] and $config['ldap_uid'] ? You want to set $config['ldap_uid'] to sAMAccountName</p>\n"}, {'answer_id': 43470, 'author': 'Vaibhav', 'author_id': 380, 'author_profile': 'https://Stackoverflow.com/users/380', 'pm_score': 0, 'selected': False, 'text': '<p>@grom... thanks but, yes PHP is working just fine. I have a WordPress and a MediaWiki installation on the same server, and they are both authenticating against the same active directory just fine.</p>\n'}, {'answer_id': 6303827, 'author': 'Andrey Regentov', 'author_id': 772853, 'author_profile': 'https://Stackoverflow.com/users/772853', 'pm_score': 1, 'selected': False, 'text': '<p>There is a trick to do activeDirectory auth with phpbb3. You should:</p>\n\n<ul>\n<li>make an account in phpBB with a name identical to some AD-name</li>\n<li>give this account admin/founder rights in phpBB</li>\n<li>login with this account</li>\n<li>set up auth parameters from within this account</li>\n</ul>\n\n<p>By the way, what error messages do you get from phpBB?</p>\n'}, {'answer_id': 45745926, 'author': 'incrementor', 'author_id': 1203340, 'author_profile': 'https://Stackoverflow.com/users/1203340', 'pm_score': 0, 'selected': False, 'text': '<p>phpBB3 does not offer much info about how to enable LDAPS, so I hope this helps someone...</p>\n\n<p>Note that you may need to actually clear all phpBB3 cookies immediately after the base installation. This will allow the admin user to see the ACP. Once you are able to consistently log into phpBB3 as an admin, and want to enable LDAPS authentication, do the following (tested with AD and Debian stretch): </p>\n\n<ul>\n<li><p>Obtain the root TLS certificate from your AD/LDAP Administrator, or get it yourself with something like:</p>\n\n<p><code># openssl s_client -showcerts -connect google.com:443</code></p></li>\n</ul>\n\n<p>See the MediaWiki documentation, as phpBB3 docs are quite sparse:\n<a href="https://www.mediawiki.org/wiki/Extension:LDAP_Authentication/Requirements" rel="nofollow noreferrer">https://www.mediawiki.org/wiki/Extension:LDAP_Authentication/Requirements</a></p>\n\n<ul>\n<li><p>Install the PEM formatted certificate with a .crt name into your OS certificate store. For Debian based systems, that would be <code>/usr/local/share/ca-certificates</code> then run <code># dpkg-reconfigure ca-certificates</code></p></li>\n<li><p>Configure <code>/etc/ldap/ldap.conf</code> to your local settings. Note that port 3268 may not have in-built limits like 686 with AD. YMMV.</p></li>\n<li><p>Create a special AD user for binding. Give it permissions to lookup, but not to change, attributes. Confirm that the credentials work with ldapsearch. eg: <code>ldapsearch -x -LLL -h ad.mydomain.com -D binduser -W -z 30 -b "dc=mydomain,dc=com" searchString</code></p></li>\n<li><p>Create a phpBB3 user with the same username as the above AD bind user. As the phpBB3 admin, grant the AD bind user Founder permissions.</p></li>\n<li><p>Using a different browser, log into phpBB3 as the binduser, then set up the LDAP Authentication as that user. (As noted in the above post).</p></li>\n<li><p>Test it! Logout of phpBB3 and then login again using the LDAP/AD credentials.</p></li>\n</ul>\n\n<p>If that does not work, the PHP dev documentation is quite good, and offers many comments with examples and example code to try. </p>\n'}]
['https://Stackoverflow.com/questions/41239', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/380/']