[horde] password with LDAP backend.

ANANT S ATHAVALE asa at isac.gov.in
Tue Mar 27 06:17:53 UTC 2012


Dear All,

I just wonder, how it works in H3/passwd without doing any of the  
things which I have done for H4/password.

Regards,
ANANT.

----- Message from ANANT S ATHAVALE <asa at isac.gov.in> ---------
    Date: Tue, 27 Mar 2012 11:45:16 +0530
    From: ANANT S ATHAVALE <asa at isac.gov.in>
Subject: Re: [horde] password with LDAP backend.
      To: horde at lists.horde.org


> Dear All,
>
> Based on the thread mentioned, I implemented the hook with inputs  
> from two of the mails of the thread.  And the final hook which I am  
> using and which works fine is as below.  I think, horde team may  
> make this or similar as the default available hook for userdn.
>
> Thanks to all for your guidance.
>
> Regards,
> ANANT.
>
>
>
> ------------
>    public function userdn($authid)
>     {
>         $ldapServer = 'localhost';
>         $ldapPort = '389';
>         $searchBase = 'dc=dos';
>
>         $ldapwithdomain = explode("@", $authid);
>         $ldapuser = $ldapwithdomain[0];
>
>         $ds = @ldap_connect($ldapServer, $ldapPort);
>         $searchResult = @ldap_search($ds, $searchBase,  
> 'mailacceptinggeneralid=' . $ldapuser );
>         $information = @ldap_get_entries($ds, $searchResult);
>
>         ldap_close($ds);
>
>         if ($information === false || $information['count'] == 0) {
>             return '';
>         } else {
>             return $information[0]['dn'];
>         }
>     }
>
> ----- Message from Hanns Mattes <hanns at hannsmattes.de> ---------
>    Date: Mon, 26 Mar 2012 12:28:31 +0200
>    From: Hanns Mattes <hanns at hannsmattes.de>
> Subject: Re: [horde] password with LDAP backend.
>      To: horde at lists.horde.org
>
>
>> Hei,
>>
>> Am 26.03.2012 12:18, schrieb ANANT S ATHAVALE:
>>
>>> I think, My understanding of the problem is not correct and hence not
>>> able to give you proper input.  But, the reality is, 'I am unable to
>>> change password' and I get the error 'Bind failed: Invalid credentials.'
>>
>> Maybe the shown error is misleading...
>>
>>>>> $backends['ldapadmin'] = array(
>>>>>   'disabled' => true,
>>>>>   'name' => 'LDAP Server with Admin Bindings',
>>>>>   'preferred' => '',
>>>>>   'policy' => array(
>>>>>       'minLength' => 6,
>>>>>       'minNumeric' => 1,
>>>>>   ),
>>>>>   'driver' => 'Ldap',
>>>>>   'params' => array(
>>>>>       'host' => 'localhost',
>>>>>       'port' => 389,
>>>>>       'basedn' => 'o=example.com',
>>>>>       'admindn' => 'cn=admin,o=example.com',
>>>>>       'adminpw' => 'somepassword',
>>>>> [...]
>>
>> With this configuration you'll bind as administrator to the Directory.
>> So at this point - if admindn and adminpw are correct - that shouldn't
>> cause an error.
>>
>> But - afaics - you need to tell passwd how to build the userdn, there is
>> a related remark in backends.php
>>
>> Please have a look at this thread:
>> http://lists.horde.org/archives/sork/Week-of-Mon-20111031/003142.html
>>
>> Hth
>>
>> Hanns
>> --
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
>
> ----- End message from Hanns Mattes <hanns at hannsmattes.de> -----
>
>
> -- 
> Anant S Athavale,
>
> ------------------------------------------------------------------------------
> Confidentiality Notice: This e-mail message, including any  
> attachments, is for
> the sole use of the intended recipient(s) and may contain confidential and
> privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the original
> message.
> ------------------------------------------------------------------------------
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


----- End message from ANANT S ATHAVALE <asa at isac.gov.in> -----


-- 
Anant S Athavale,

------------------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
------------------------------------------------------------------------------



More information about the horde mailing list