Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP LDAP connection authenticates without DN information
    primarykey
    data
    text
    <p>It is the first time I am working with PHP 5 LDAP library and I am a bit confused. I would be very happy if anyone could give me some clarifications on the following:</p> <p><strong>First of all let me give my configurations:</strong></p> <p><strong>LDAP server:</strong> Windows Server 2013 Active Directory</p> <p><strong>Hostname:</strong> winad</p> <p><strong>Domain:</strong> domain.local</p> <p><strong>IP:</strong> 1.1.1.1 (for the sake of explaining)</p> <p><strong>Windows Account used for binding:</strong> Administrator</p> <p>Ping hostname from dev machine works</p> <p>Ping ip from dev machine works</p> <p>Ping winad.domain.local from dev machine fails</p> <p><strong>Development Environment:</strong> Windows 8 Professional with WAMP</p> <p><strong>PHP:</strong> 5.3.13</p> <p>PHP LDAP Module loaded and working</p> <p>Apache LDAP module not loaded</p> <p><strong>Scenario:</strong></p> <p>I am trying to authenticate a user against the Windows AD with the administrator account for a start. Here is a sample of my code:</p> <p>I will be using these variables in the various scenarios below:</p> <pre><code>$hostname = "winad"; $dnex= "uid=Administrator, ou=Users, dc=domain, dc=local"; </code></pre> <p>Code that works:</p> <pre><code>$conn = ldap_connect($hostname); $bind = ldap_bind($conn, "DOMAIN\Administrator", "password"); </code></pre> <p>Code that fails:</p> <pre><code>$conn = ldap_connect($hostname); $bind = ldap_bind($conn, $dnex, "password"); </code></pre> <p>Error: Invalid credentials</p> <p>Now my question is why does it fails when I specify a dn? </p> <p>Let say I have location1.domain.local and location2.domain.local and I want to bind only with location2, it does not seem possible without specifying the dn.</p> <p>Can somebody show the right way to proceed?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload