Solved

AD Authentication using LDAP inside PHP

Posted on 2008-10-01
2
300 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…

770 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