Solved

AD Authentication using LDAP inside PHP

Posted on 2008-10-01
2
298 Views
Last Modified: 2013-12-24
We have a contractor who is developing a database system for us and he is having issues authenticating to Active Directory using LDAP inside PHP. Can anyone tell me what the syntax is and what information is needed? he sent me this link.

http://us3.php.net/manual/en/function.ldap-bind.php
0
Comment
Question by:mhmservices
2 Comments
 

Author Comment

by:mhmservices
ID: 22617576
Here is the code the contractor is using


    var $ldap = array(
        'driver'   => 'ldap',
        'host'     => 'mhmdc1',
        //'login'    => 'gemadmin',
//        'login'    => 'cn=gemadmin,dc=mhmnet',                    
        'login' => 'cn=gemadmin,dc=mhmnet,dc=mhm-services,dc=local',
//        'login' => 'cn=username,dc=mhmnet,dc=mhm-services,dc=local',
//        'login' => 'CN=Username,OU=IT,OU=MHM Users,DC=mhmnet,DC=local',
        'password' => 'Gem@dmin',
        //'database' => 'test_database_name'
    );



other information
domain- mhmnet
user- gemadmin
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 22701143

> 'login' => 'cn=gemadmin,dc=mhmnet,dc=mhm-services,dc=local',

That's the full path to the user, here it suggests the user account has been created in the root of your domain.

If the user was in the Users container that would change to:

'login' => 'cn=gemadmin,cn=users,dc=mhmnet,dc=mhm-services,dc=local',

Or if the user was in an OU you created it would be:

'login' => 'cn=gemadmin,ou=somewhere,ou=anotherou,dc=mhmnet,dc=mhm-services,dc=local',

Chris
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes some very basic things about SQL Server filegroups.
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now