authentification on Active Directory with LDAP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

my english is not so good.

I want to use the users of our active directory in the intranet for a portal

i dont know how to authenticate?

$server = "";
$connectid = @ldap_connect($server);

is ok.

$binding = @ldap_bind($connectid) or die("Error");
echo "ok";

is still ok.

if i use my username an password i get Error
$binding = @ldap_bind($connectid,$username,$password) or die("Error");

i dont understand this  $basedn thing, for example in the search funtion.

 $search = @ldap_search($connectid,$basedn,$filter);

$basedn = "ou=User,dc=ho,dc=de";

where can i finde the values for ou=  dc= an c=  and so on.

Michael Schffer

Re: authentification on Active Directory with LDAP

Michael Schäffer wrote:

Quoted text here. Click to load it

What OS is the web server running? If Linux, look into PHP's "PAM"
functions, and PAM's SAMBA module. I've successfully authenticated
against an NT domain that way with PHP before.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Site Timeline