<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>LDAP Authentication not working</title> 
  <pubDate>Thu, 09 Apr 2026 17:14:43 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7640</link> 
  <atom:link rel="self" type="application/rss+xml" title="LDAP Authentication not working" href="https://bugs.horde.org/ticket/7640/rss" /> 
  <description>LDAP Authentication not working</description> 
 
   
   
  <item> 
   <title>I&#039;ve got Horde 3.3 LDAP authentication configured exactly th</title> 
   <description>I&#039;ve got Horde 3.3 LDAP authentication configured exactly the same way as I had it in 3.1 and it refuses to authenticate. Originally I had the message &quot;Empty Result&quot; and applied the fix from ticket #6362. I might add that although this fix is marked as having been applied to HEAD in March 2008, it is still not in the final release code so might have gotten overlooked. Regardless, I now get the message &quot;Login failed.&quot; The horde.log entries don&#039;t tell me much, other than the fact that the login failed. I&#039;m authenticating against an AD v.3 server using SSL (ldaps://) with md5-hex password encryption, and when I go back to Horde 3.1 with the same exact configuration, it allows me to log in with no problem. I can&#039;t really provide more information based on the debug info. I&#039;m getting. Is there something I can do to get a better handle on what&#039;s going on in the background? I removed the &#039;@&#039; form all the ldap statements in lib/Horde/Auth/ldap.php and didn&#039;t see any errors. Thanks!</description> 
   <pubDate>Wed, 05 Nov 2008 15:48:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50279</link> 
  </item> 
   
  <item> 
   <title>Does login to the new Horde install work with any other auth</title> 
   <description>Does login to the new Horde install work with any other auth backend? Is there anything in the LDAP server logs?</description> 
   <pubDate>Thu, 06 Nov 2008 05:26:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50372</link> 
  </item> 
   
  <item> 
   <title>I just tried it with both &#039;auto&#039; and &#039;sql&#039; with local accoun</title> 
   <description>I just tried it with both &#039;auto&#039; and &#039;sql&#039; with local accounts and they both work fine. I should add that I&#039;ve tested this on several different Ubuntu and Fedora servers running both PHP4 and PHP5 and it won&#039;t do LDAP authentication at all. Running the 3.1 version on all of these machines works fine.



&gt; Does login to the new Horde install work with any other auth backend? 

&gt; Is there anything in the LDAP server logs?

</description> 
   <pubDate>Thu, 06 Nov 2008 13:36:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50397</link> 
  </item> 
   
  <item> 
   <title>It also works with IMAP authentication; the IMAP server is L</title> 
   <description>It also works with IMAP authentication; the IMAP server is LDAP authenticated so the same credentials can be used.



&gt; Does login to the new Horde install work with any other auth backend? 

&gt; Is there anything in the LDAP server logs?

</description> 
   <pubDate>Thu, 06 Nov 2008 13:41:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50399</link> 
  </item> 
   
  <item> 
   <title>We&#039;re looking at the LDAP logs...



&gt; It also works with IM</title> 
   <description>We&#039;re looking at the LDAP logs...



&gt; It also works with IMAP authentication; the IMAP server is LDAP 

&gt; authenticated so the same credentials can be used.

&gt;

&gt;&gt; Does login to the new Horde install work with any other auth backend?

&gt;&gt; Is there anything in the LDAP server logs?

&gt;

</description> 
   <pubDate>Thu, 06 Nov 2008 14:59:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50401</link> 
  </item> 
   
  <item> 
   <title>The LDAP logs are clean. Lots of entries that look like this</title> 
   <description>The LDAP logs are clean. Lots of entries that look like this (proprietary info. replaced with &#039;x&#039;):



Nov  6 03:39:59 xxxxxx slapd[5541]: conn=xxxxxxx fd=xx ACCEPT from IP=xxx.xxx.xxx.xxx:xxxxx (IP=0.0.0.0:636)



&gt; Does login to the new Horde install work with any other auth backend? 

&gt; Is there anything in the LDAP server logs?

</description> 
   <pubDate>Thu, 06 Nov 2008 18:33:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50411</link> 
  </item> 
   
  <item> 
   <title>If I had to guess, looking at the changes to the LDAP auth d</title> 
   <description>If I had to guess, looking at the changes to the LDAP auth driver between 3.1 and 3.3, this one stands out:

http://cvs.horde.org/diff.php/framework/Auth/Auth/ldap.php?r1=1.89&amp;r2=1.90



However, it&#039;d be helpful to get something saying _what_ is failing. Shouldn&#039;t there be authentication attempts in the LDAP logs? Or is login failing something else on the PHP side in the LDAP driver?



Ben K., bringing you in on this since you&#039;ve authored most changes to the driver lately.



Kristian, the next troubleshooting technique here, aside from putting in debug code, is probably for you to try the different versions between 3.1 and 3.3 (http://cvs.horde.org/framework/Auth/Auth/ldap.php) and see at what point it breaks.</description> 
   <pubDate>Fri, 07 Nov 2008 03:12:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50423</link> 
  </item> 
   
  <item> 
   <title>&gt; However, it&#039;d be helpful to get something saying _what_ is</title> 
   <description>&gt; However, it&#039;d be helpful to get something saying _what_ is failing. 

&gt; Shouldn&#039;t there be authentication attempts in the LDAP logs? Or is 

&gt; login failing something else on the PHP side in the LDAP driver?



That&#039;s what it looks like so far--like the LDAP auth is fine, but something else between that step and actually being logged into Horde is gumming things up.



&gt; Kristian, the next troubleshooting technique here, aside from putting 

&gt; in debug code, is probably for you to try the different versions 

&gt; between 3.1 and 3.3 

&gt; (http://cvs.horde.org/framework/Auth/Auth/ldap.php) and see at what 

&gt; point it breaks.



I&#039;ll do that today and maybe diff the one that breaks to see what&#039;s changed.</description> 
   <pubDate>Fri, 07 Nov 2008 12:39:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50442</link> 
  </item> 
   
  <item> 
   <title>I started with the version I&#039;m currently running (3.1.6) on </title> 
   <description>I started with the version I&#039;m currently running (3.1.6) on my production servers, and worked my way up, one release at a time, following this testing process:



- unpack horde-x.x.x and rename as &#039;horde&#039;

- add .htaccess with &#039;Allow from all&#039; and &#039;DirectoryIndex index.php&#039;

- chmod 777 horde/config

- execute &#039;for f in *.dist; do cp $f `basename $f .dist`; done&#039; in horde/config

- chmod 666 *.* in horde/config

- open web browser and clear cache, cookies, etc.

- point browser to /horde on test server (automatically logs in as Administrator first time)

- Setup -&gt; horde -&gt; Authentication

- select &#039;LDAP authentication&#039; and configure for ldap server

- Setup -&gt; horde -&gt; Preference System

- select &#039;PHP Sessions&#039;

- Log out

- Log in



Version 3.1.9 is the last version in which LDAP authentication works for me with the settings I&#039;ve always used. I also noticed that 3.2 is the first version in which the default password encryption is not md5-hex in the Authentication setup form; just in case that&#039;s relevant. Attached is a diff of the changes between horde/lib/Horde/Auth/ldap.php on version 3.1.9 and 3.2.</description> 
   <pubDate>Fri, 07 Nov 2008 13:43:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50443</link> 
  </item> 
   
  <item> 
   <title>Ooookay. Lets try that attachment with a .patch extension...</title> 
   <description>Ooookay. Lets try that attachment with a .patch extension...?</description> 
   <pubDate>Fri, 07 Nov 2008 13:47:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50445</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve narrowed it down to this change, which, when I revert b</title> 
   <description>I&#039;ve narrowed it down to this change, which, when I revert back to the old code, allows me to log in successfully:



@@ -135,9 +147,11 @@

    function _findDN($userId)

    {

        /* Search for the user&#039;s full DN. */

+     $filter = $this-&gt;_getParamFilter();

+     $filter = &#039;(&amp;(&#039; . $this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId . &#039;)&#039; .

+     $filter . &#039;)&#039;;

        $search = @ldap_search($this-&gt;_ds, $this-&gt;_params[&#039;basedn&#039;],

-       $this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId,

-       array($this-&gt;_params[&#039;uid&#039;]));

+     $filter, array($this-&gt;_params[&#039;uid&#039;]));</description> 
   <pubDate>Fri, 07 Nov 2008 14:12:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50446</link> 
  </item> 
   
  <item> 
   <title>The rest of the code isn&#039;t really functionally different, ju</title> 
   <description>The rest of the code isn&#039;t really functionally different, just formatted differently. The $filter value is pretty much the only thing that&#039;s changed:



Currently, its value is this:



&#039;(&amp;(&#039; . $this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId . &#039;)&#039; . $this-&gt;_getParamFilter() . &#039;)&#039;; 



...and it used to be this:



$this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId, array($this-&gt;_params[&#039;uid&#039;]</description> 
   <pubDate>Fri, 07 Nov 2008 14:19:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50447</link> 
  </item> 
   
  <item> 
   <title>Correction:



That last line should be this:



$this-&gt;_par</title> 
   <description>Correction:



That last line should be this:



$this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId;



...not this:



&gt; $this-&gt;_params[&#039;uid&#039;] . &#039;=&#039; . $userId, array($this-&gt;_params[&#039;uid&#039;]

</description> 
   <pubDate>Fri, 07 Nov 2008 14:26:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50448</link> 
  </item> 
   
  <item> 
   <title>So it is http://cvs.horde.org/diff.php/framework/Auth/Auth/l</title> 
   <description>So it is http://cvs.horde.org/diff.php/framework/Auth/Auth/ldap.php?r1=1.89&amp;r2=1.90. Ben, can you advise on this? I presume a config setting change is in order, but I don&#039;t know.</description> 
   <pubDate>Fri, 07 Nov 2008 20:27:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t50463</link> 
  </item> 
   
  <item> 
   <title>While trying to figure out another problem (http://bugs.hord</title> 
   <description>While trying to figure out another problem (http://bugs.horde.org/ticket/7900) related to not being able to see LDAP users in permissions forms, I landed on the ExistingLDAPHowTo (http://wiki.horde.org/ExistingLDAPHowTo) web page on the horde site and went through the process of checking my LDAP config. As it turns out, a value that I used to use for the objectClass, &#039;uid&#039;, is no longer valid. It was probably never valid, but Horde 3.3 enforces the rules properly. I have replaced this value with &#039;shadowAccount&#039; and that has resolved this problem.



&gt; So it is 

&gt; http://cvs.horde.org/diff.php/framework/Auth/Auth/ldap.php?r1=1.89&amp;r2=1.90. 

&gt; Ben, can you advise on this? I presume a config setting change is in 

&gt; order, but I don&#039;t know.

</description> 
   <pubDate>Fri, 30 Jan 2009 16:26:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t52152</link> 
  </item> 
   
  <item> 
   <title>Sounds like this was resolved.</title> 
   <description>Sounds like this was resolved.</description> 
   <pubDate>Thu, 18 Oct 2012 05:20:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7640#t73793</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
