note 17882 added to ref.ldap
| From: | webmaster at autourdupc dot com | Date: | Mon, 31 Dec 2001 09:36:59 +0000 |
| Subject: | note 17882 added to ref.ldap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24013@lists.php.net to get a copy of this message | ||
When authenticating to a Win2k LDAP server, the name of the person must be the FULL NAME in the dn
NB : nothing is case sensitive !
$dn="cn=DUPOND John, cn=Users, dc=autourdupc, dc=com"
$password = "Password_of_DUPOND";
Then when you bind to the LDAP database you use:
if (!($ldap = ldap_connect("<server>", <port>))) {
die ("Could not connect to LDAP server");
}
if (!($res = @ldap_bind($ldap, $dn, $password))) {
die ("Could not bind to $dn");
}
Hope this will usefull for everyone !
--
http://www.php.net/manual/en/ref.ldap.php
http://master.php.net/manage/user-notes.php?action=edit+17882
http://master.php.net/manage/user-notes.php?action=delete+17882
http://master.php.net/manage/user-notes.php?action=reject+17882