<?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>Tries to bind to LDAP as each user that has a gallery</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:22 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8269</link> 
  <atom:link rel="self" type="application/rss+xml" title="Tries to bind to LDAP as each user that has a gallery" href="https://bugs.horde.org/ticket/8269/rss" /> 
  <description>Tries to bind to LDAP as each user that has a gallery</description> 
 
   
   
  <item> 
   <title>Upon opening Ansel for the first time after logging on, Anse</title> 
   <description>Upon opening Ansel for the first time after logging on, Ansel attempts to bind to the preferences system (LDAP) as each user that has a Gallery in Ansel. This results in the error - &quot;The preferences backend is currently unavailable and your preferences have not been loaded. You may continue to use the system with default settings.&quot;



LDAP logs show the following message for each gallery owner:



May 14 00:03:12 server01 slapd[1156]: conn=111275 op=2 BIND dn=&quot;uid=simon,ou=users,dc=simonandkate,dc=lan&quot; method=128 

May 14 00:03:12 server01 slapd[1156]: conn=111275 op=2 RESULT tag=97 err=53 text=unauthenticated bind (DN with no password) disallowed 



</description> 
   <pubDate>Wed, 13 May 2009 14:11:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54112</link> 
  </item> 
   
  <item> 
   <title>&gt; Upon opening Ansel for the first time after logging on, An</title> 
   <description>&gt; Upon opening Ansel for the first time after logging on, Ansel 

&gt; attempts to bind to the preferences system (LDAP) as each user that 

&gt; has a Gallery in Ansel. This results in the error - &quot;The preferences 

&gt; backend is currently unavailable and your preferences have not been 

&gt; loaded. You may continue to use the system with default settings.&quot;

&gt;

&gt; LDAP logs show the following message for each gallery owner:

&gt;

&gt; May 14 00:03:12 server01 slapd[1156]: conn=111275 op=2 BIND 

&gt; dn=&quot;uid=simon,ou=users,dc=simonandkate,dc=lan&quot; method=128

&gt; May 14 00:03:12 server01 slapd[1156]: conn=111275 op=2 RESULT tag=97 

&gt; err=53 text=unauthenticated bind (DN with no password) disallowed

&gt;

&gt;



With an Ansel gallery made accessible to guest users, opening .../horde/ansel as a not logged in user returns the error as above. </description> 
   <pubDate>Wed, 13 May 2009 15:05:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54114</link> 
  </item> 
   
  <item> 
   <title>Horde Debug logs:



May 15 10:07:16 HORDE [debug] [ansel] Q</title> 
   <description>Horde Debug logs:



May 15 10:07:16 HORDE [debug] [ansel] Query By Horde_Share_sql_hierarchical: SELECT DISTINCT s.*  FROM ansel_shares s  LEFT JOIN ansel_shares_users AS u ON u.share_id = s.share_id LEFT JOIN ansel_shares_groups AS g ON g.share_id = s.share_id WHERE ( (s.share_owner = &#039;katie&#039; OR (s.perm_creator &amp; 2) OR (s.perm_default &amp; 2) OR ( u.user_uid = &#039;katie&#039; AND (u.perm &amp; 2)) OR (g.group_uid IN (&#039;cn=Everyone,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeMailAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeFileMgrAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeAddressBookAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeCalendarAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeTasksAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeNotesAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeBookmarksAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordePhotosAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeWikiAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;,&#039;cn=HordeForumAccess,ou=hordegroups,dc=simonandkate,dc=lan&#039;) AND (g.perm &amp; 2))) ) AND (s.share_parents = &#039;&#039; OR s.share_parents IS NULL) ORDER BY s.attribute_name ASC [pid 1582 on line 94 of &quot;/usr/share/horde/lib/Horde/Share/sql_hierarchical.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] using gallery style: ansel_default in Ansel::getDefaultImage() [pid 1582 on line 1633 of &quot;/usr/share/horde/ansel/lib/Ansel.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Error rebinding for prefs writing: [53]: Server is unwilling to perform [pid 1582 on line 270 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Internal LDAP error.  Details have been logged for the administrator. [pid 1582 on line 348 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Error rebinding for prefs writing: [53]: Server is unwilling to perform [pid 1582 on line 270 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Internal LDAP error.  Details have been logged for the administrator. [pid 1582 on line 348 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] using gallery style: ansel_default in Ansel::getDefaultImage() [pid 1582 on line 1633 of &quot;/usr/share/horde/ansel/lib/Ansel.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] using gallery style: ansel_default in Ansel::getDefaultImage() [pid 1582 on line 1633 of &quot;/usr/share/horde/ansel/lib/Ansel.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] using gallery style: ansel_default in Ansel::getDefaultImage() [pid 1582 on line 1633 of &quot;/usr/share/horde/ansel/lib/Ansel.php&quot;]

May 15 10:07:16 HORDE [debug] [ansel] ansel:admin not found. [pid 1582 on line 265 of &quot;/usr/share/horde/lib/Horde/Perms.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Error rebinding for prefs writing: [53]: Server is unwilling to perform [pid 1582 on line 270 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Internal LDAP error.  Details have been logged for the administrator. [pid 1582 on line 348 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Error rebinding for prefs writing: [53]: Server is unwilling to perform [pid 1582 on line 270 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]

May 15 10:07:16 HORDE [error] [ansel] Internal LDAP error.  Details have been logged for the administrator. [pid 1582 on line 348 of &quot;/usr/share/horde/lib/Horde/Prefs/ldap.php&quot;]</description> 
   <pubDate>Fri, 15 May 2009 00:08:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54161</link> 
  </item> 
   
  <item> 
   <title>This is due to the fact there is a preference that allows a </title> 
   <description>This is due to the fact there is a preference that allows a user to customize the text that is displayed when another user is viewing their list of galleries, so instead of &quot;Michael&#039;s Galleries&quot; I may want mine to say &quot;The Rubinsky Family&#039;s Galleries&quot;.  In order to do this, Ansel needs to access the prefs of each user that has galleries to be displayed in the current view. This will obviously only work for pref storage backends that don&#039;t require an explicit login from the user whose prefs we are reading.



The fix for this will probably be to introduce a new configuration switch to turn this feature on or off. &quot;On&quot; for the servers that are using an SQL backend (or even LDAP, if not requiring individual user credentials). and &quot;off&quot; for those servers that can&#039;t do this or don&#039;t want to for performance reasons.</description> 
   <pubDate>Fri, 15 May 2009 00:46:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54163</link> 
  </item> 
   
  <item> 
   <title>Thanks Michael - that makes sense. My LDAP directory though </title> 
   <description>Thanks Michael - that makes sense. My LDAP directory though is set for &quot;* read all&quot; except for password fields - perhaps a read could be attempted as current user first rather than trying to bind as the gallery owner?



Any chance of a quick and dirty hack to get around it? :)</description> 
   <pubDate>Fri, 15 May 2009 01:02:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54165</link> 
  </item> 
   
  <item> 
   <title>&gt; The fix for this will probably be to introduce a new confi</title> 
   <description>&gt; The fix for this will probably be to introduce a new configuration 

&gt; switch to turn this feature on or off. &quot;On&quot; for the servers that are 

&gt; using an SQL backend (or even LDAP, if not requiring individual user 

&gt; credentials). and &quot;off&quot; for those servers that can&#039;t do this or don&#039;t 

&gt; want to for performance reasons.



If you remember, time ago I prepared a patch to allow locking of this preferences and avoid all loading but was rejected. Now days, I think a better approach it will be to make the pref object load the preference for multiply users at once. This will minimize queries not just in Ansel (all list with from_addr or fullname etc). So Ansel will be able to first retrieve usernames of listed galleries and then load all pref values at once  (just one query instead of 9 queries in a default gallery list).</description> 
   <pubDate>Fri, 15 May 2009 10:13:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54176</link> 
  </item> 
   
  <item> 
   <title>The reason the patch was rejected (Bug: 6212) was because of</title> 
   <description>The reason the patch was rejected (Bug: 6212) was because of the way in which it was implemented, not because of the idea.  I agreed at the time (and still do) of the usefulness of your idea, but the implementation needs to be done in the Prefs class, and not done as a hackish wrapper around the prefs object done locally in client code. 



Also, your idea for loading all needed users&#039; prefs at once is good, but would need to be workable (or at least degrade gracefully) across all the available pref backends - otherwise we are still in the same boat we are in now.  If this is possible (I don&#039;t know enough about backends such as LDAP to know for sure), it might be a good approach for Horde 4, but I fear it&#039;s too late to do this for H3.</description> 
   <pubDate>Fri, 15 May 2009 13:49:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54178</link> 
  </item> 
   
  <item> 
   <title>&gt; - perhaps a read could be 

&gt; attempted as current user fi</title> 
   <description>&gt; - perhaps a read could be 

&gt; attempted as current user first rather than trying to bind as the 

&gt; gallery owner?



I&#039;m afraid not. At least not from within Ansel, as that would get you the current user&#039;s information, not the requested user.  I, unfortunately, do not know enough about our LDAP prefs driver to know if this is something that makes sense for the LDAP prefs driver....LDAP gurus?



&gt; Any chance of a quick and dirty hack to get around it? :)



Well, you could just force that part of the code to not execute by commenting it out, but I&#039;ll be adding a configuration switch to Ansel to allow shutting it off, I&#039;ll probably get to it later on this afternoon.

</description> 
   <pubDate>Fri, 15 May 2009 14:02:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54179</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/ansel/config/conf.xml?rt=horde&amp;r1=1.58&amp;r2=1.59&amp;ty=u
http://cvs.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde&amp;r1=1.584&amp;r2=1.585&amp;ty=u
http://cvs.horde.org/diff.php/ansel/lib/Views/List.php?rt=horde&amp;r1=1.35&amp;r2=1.36&amp;ty=u
http://cvs.horde.org/diff.php/ansel/templates/group/owner.inc?rt=horde&amp;r1=1.27&amp;r2=1.28&amp;ty=u</description> 
   <pubDate>Fri, 15 May 2009 19:39:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54197</link> 
  </item> 
   
  <item> 
   <title>Added a configuration switch to allow turning this off. To t</title> 
   <description>Added a configuration switch to allow turning this off. To the original poster, this will fix your issue, but you might also want to try providing a specific DN to bind with for searches. Otherwise, there are a number of other places in Horde where this particular issue will bite you.</description> 
   <pubDate>Fri, 15 May 2009 19:53:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54199</link> 
  </item> 
   
  <item> 
   <title>&gt; Added a configuration switch to allow turning this off. To</title> 
   <description>&gt; Added a configuration switch to allow turning this off. To the 

&gt; original poster, this will fix your issue, but you might also want to 

&gt; try providing a specific DN to bind with for searches. Otherwise, 

&gt; there are a number of other places in Horde where this particular 

&gt; issue will bite you.



Thanks Michael, I will put in the patches and see how that goes.



You are right - this is biting me in several places across Horde - The LDAP prefs backend is refusing these unauthenticated binds from at least 5 or 6 of the Horde apps for me. Some of them are patched (thanks Matthias Rolke) as they are simply trying to bind as *current* user but without password (e.g. Kronolith), but some of them are failing trying to read other user&#039;s preference data (e.g. Ansel and Turba). 



When you say providing a specific DN to bind with for searches do you mean at Horde&#039;s $conf[prefs][params][searchdn] and $conf[prefs][params][searchpw]? Does the DN specified there need to be able to write to LDAP prefs or just read them? I&#039;m trying to avoid putting privileged LDAP access data into config files on the Horde box. At the moment I have those entries blank, which says it should be binding &quot;anonymously&quot; - it doesn&#039;t appear to be doing so? An anonymous bind to read should work fine... a bind as an actual user but without password does not. I can do an anonymous bind login in phpldapadmin and read *all* the Horde prefs without an issue.



From looking at my LDAP server logs, I cannot see *any* anonymous binds from Horde, even though the above entries are set to search via an anonymous bind. When phpmyldapadmin does an anonymous bind I see:



May 16 09:00:32 server01 slapd[1156]: conn=138020 op=1 BIND dn=&quot;&quot; method=128 



All the Horde binds are as a user, even with the search DN set as blank. That does not seem to be correct?</description> 
   <pubDate>Fri, 15 May 2009 23:02:37 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54207</link> 
  </item> 
   
  <item> 
   <title>&gt; From looking at my LDAP server logs, I cannot see *any* an</title> 
   <description>&gt; From looking at my LDAP server logs, I cannot see *any* anonymous 

&gt; binds from Horde, even though the above entries are set to search via 

&gt; an anonymous bind. When phpmyldapadmin does an anonymous bind I see:



Correction, I am seeing some anonymous binds, will dig out some log entries... the anonymous binds are immediately followed by attempts to bind as other users.</description> 
   <pubDate>Sat, 16 May 2009 03:23:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54210</link> 
  </item> 
   
  <item> 
   <title>OK, I think I&#039;ve figured this out...



Horde uses the setti</title> 
   <description>OK, I think I&#039;ve figured this out...



Horde uses the setting $conf[prefs][params][writedn] (which it says is for &quot;Bind to LDAP as which user when writing permissions to LDAP&quot;) to bind with to *read* users&#039; HordePrefs when opening Ansel (for all Gallery owners), Wicked pages (for the page author) etc. Making that setting a DN with minimum read access to *all users* HordePrefs resolves these issues across all apps. Obviously if that user has only read access however you can&#039;t change any of your own prefs. 



Setting it to a user with write access allows you to change your own prefs, but also gives you rights (albeit with no obvious ability) to change *any* users Prefs, not just read them.



Set it to either &quot;Bind As Admin&quot; (or &quot;Use Search Credentials&quot; with $conf[prefs][params][searchdn] set to a user with write access to all users&#039; HordePrefs etc) and no more Error 53 on LDAP binds. 





That doesn&#039;t seem right to me - this setting would appear to me to be for the purpose of *writing* one&#039;s own prefs, not for reading other users&#039; prefs.



What I have done as a &#039;work-around&#039; is use the cn=horde,ou=accounts,dc=simonandkate,dc=lan account that I have for groups management, it&#039;s got (in slapd.conf):



access to * 

	attrs=@hordePerson

	by dn=&quot;cn=horde,ou=accounts,dc=simonandkate,dc=lan&quot; write 



So all these bugs that I have raised appear to me to come back to a Horde LDAP issue - with an LDAP backend it would appear that the $conf[prefs][params][writedn] parameter needs to have *all users* HordePerson attributes write access - using &quot;Bind As User&quot; in that setting will cause the failures logged in the bugs I have raised when trying to access another user&#039;s prefs. 



I would much rather have it set to Bind As User, and have an additional setting that the Horde LDAP code uses to READ all users HordePrefs etc. Along the lines of a setting $conf[prefs][params][readdn] &quot;User Horde uses to bind to LDAP to read other users&#039; preferences&quot;.



Over to you PHP / LDAP gurus... :)



Simon</description> 
   <pubDate>Sat, 16 May 2009 05:27:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54211</link> 
  </item> 
   
  <item> 
   <title>See the catch-all ticket #8353.</title> 
   <description>See the catch-all ticket #8353.</description> 
   <pubDate>Tue, 16 Jun 2009 13:38:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8269#t54609</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
