PHP, LDAP and Windows Integrated Authentication
am 11.09.2008 16:43:18 von Break------=_NextPart_000_0013_01C9141C.BB02C310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Good morning all,
System platform:
Server with W2K3, IIS6 and PHP 5
Workstation with XP SP3.
I make a search into my LDAP.
It works but I need to make the bind with a username/password couple
Code below:
$ldap_user =3D substr($_SERVER['AUTH_USER'],7)."@domaine.com";=20
$ldap_pass); //here putting the password for ^$ldap_user;
$ldap_host =3D 'ldap.domaine.com';
$ldap_domain=3D 'ldap-domain';
$base_dn=3D'ou=3DUSER,OU=3DOrgUnit,dc=3Ddomain,dc=3Dcom';
$filter=3D'(cn=3D*)';
$connect=3Dldap_connect($ldap_host,389) or exit('>>Could not connect to =
LDAP server<<');
$bind=3Dldap_bind($connect,$ldap_user,$ldap_pass) or exit('<
$read=3Dldap_search($connect,$base_dn,$filter);
$info=3Dldap_get_entries($connect,$read);
echo $info['count'].' entries returned
';
echo "
";
for ($i=3D0;$i<$info['count']; $i++)
{
$info_cn =3D $info[$i]['initials'][0];
echo 'cn =3D '.$info_cn.'
';
}
?>
I want use the Windows Integrated Authentication to send to my ldap_bind =
command the current user/password instead of hardcoded it into the php =
script.
Regards,
C.B
------=_NextPart_000_0013_01C9141C.BB02C310--