Re: Re: php ldap
| From: | Santosh Jambhlikar | Date: | Fri, 26 Aug 2005 09:34:56 +0000 |
| Subject: | Re: Re: php ldap | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221417@lists.php.net to get a copy of this message | ||
$ldaprdn = 'user';
$ldappass = 'userpass';
$ldapconn = ldap_connect("ldap.mydomain.com")
or die("Could not connect to LDAP server.");
if ($ldapconn) {
$ldapbind = ldap_bind($ldapconn,$ldaprdn, $ldappass);
if ($ldapbind) {
echo "LDAP bind successful...";} else {
echo "LDAP bind failed...";} } this program is giving me "*Invalid DN syntax* " error. what's wrong? cn for the the user is "user" Mark Rees wrote:
"Santosh Jambhlikar" <santosh.jambhlikar@cash-tech.com> wrote in message news:430EBCEC.7090005@cash-tech.com...You could try to bind to the server using ldap_bind with the supplied password. That will check if it is valid or not.then can i output the SMD5 of my password in php. Jeff Loiselle wrote:Santosh Jambhlikar wrote:Hi , I have a ldap server the user password are stored in that. my php ldasearch result says that the result is ldap user password : {SMD5}eRuT8dttD6M6N6tgMJF33/TNAvc= i want to compare this password with the user given password in other application (obviously php) but when i md5("passwordgiven") then it is showing different output. Any suggestions.
MD5 and SMD5 are not the same type of encryption. md5() will not return the correct results.