Let me preface this question with, I am not a sys admin by any means. I am a LAMP developer attempting to use PHP's LDAP extension to authenticate users of a PHP application against my client's Active Directory accounts.
Setup:
Box 1:
Windows 2003 running Apache 2.2 and PHP 5.2
Box 2:
Windows box running Active Directory
The sys admin send me a screenshot of the Active Directory tree. My account was located on:
domain: area1.area2.local
ad host machine: box2
My account is in the Our Users -> Our Department -> Our Team folder.
$connection = ldap_connect('box2'); <------- works
ldap_bind($connection,'cn=billybob,ou=Our Users,ou=Our Department,ou=Our Team,dc=area1,dc=area2,dc=local','mypassword'); <------- throws 'Unable to bind to server: Invalid credentials'
Any ideas?
Here is the code I used as my first test.
I'm using this from the command line.
Usage :
ldap_search <username> <password> <searchElement> <seachValue>
e.g.
ldap_search RQuadling blahblahblah sn Q*
will use my credentials to look for all entities that have a SN (surname) element that starts with Q.
If you change LDAP_Server to the server name and DOMAIN to the domain.
Open in new window