The easiest way I've found, if you just want to verify their username &
password, you can do this:

$ds=ldap_connect("ldap://yourdc.yourdomain.com";);

// Fix for Windows 2003 AD
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);

if ($ds) {

[EMAIL PROTECTED]($ds, $aduser, $adpass);
$adauth = "No"; // prevent insertion
// verify binding
if ($r) {
$adauth = "Yes";
} else {
$adauth = "No";
}
// end ad check
}
ldap_close($ds);

If you need groups and such, good luck.

Matt

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 13, 2006 11:34 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] System integration
> 
> Hi guys,
> 
> Does anyone know or got an idea of how to access the user 
> accounts of Active Directory using PHP?
> 
> I need to integrate my intranet application's authentication 
> with that of Active Directory.
> 
> Any help or ideas will be greatly appreciated.
> 
> Kind Regards,
> Dale
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to