<?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 preferences - unauthenticated bind attempt / failure</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:53 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8271</link> 
  <atom:link rel="self" type="application/rss+xml" title="LDAP preferences - unauthenticated bind attempt / failure" href="https://bugs.horde.org/ticket/8271/rss" /> 
  <description>LDAP preferences - unauthenticated bind attempt / failure</description> 
 
   
   
  <item> 
   <title>I have a shared LDAP directory in Turba that functionally wo</title> 
   <description>I have a shared LDAP directory in Turba that functionally works fine. Users with granted permissions can add and edit contacts.



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;



Reproducible: yes every time - Logoff, logon, go to the shared address book, open a contact created by a user other than me, return to the shared addressbook - error is thrown.



LDAP log:



May 14 12:31:55 server01 slapd[1156]: conn=121129 op=2 BIND dn=&quot;uid=katie,ou=users,dc=simonandkate,dc=lan&quot; method=128 

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



The user it is attempting to bind as is the user who created the shared contact.



These errors are occurring in Wicked http://bugs.horde.org/ticket/8270 when accessing a page created by someone else, Ansel http://bugs.horde.org/ticket/8269 when listing galleries created by someone else, and Turba (this ticket) when returning from a contact created by someone else - consistently and repeatably. 



The patches posted for Ingo http://bugs.horde.org/ticket/7418, Kronolith http://bugs.horde.org/ticket/8246 and Nag http://bugs.horde.org/ticket/8251 have solved the issues for me in those applications.



My Horde Prefs config is as follows:



$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;hostspec&#039;] = &#039;server01.simonandkate.lan&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;port&#039;] = 389;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;version&#039;] = &#039;3&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;tls&#039;] = true;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;basedn&#039;] = &#039;dc=simonandkate,dc=lan&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;writedn&#039;] = &#039;user&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;uid&#039;] = &#039;uid&#039;;

$conf[&#039;prefs&#039;][&#039;driver&#039;] = &#039;ldap&#039;;



Preferences binds are done as the logged on user. Would doing a preferences bind as an LDAP user with permissions to all the required parts of LDAP solve this? I would rather bind as the user concerned... seems to be a more &quot;proper&quot; way to do it, and I&#039;d have thought it should work given the option is there. 

</description> 
   <pubDate>Thu, 14 May 2009 02:43:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8271#t54123</link> 
  </item> 
   
  <item> 
   <title>Horde debug logs:



May 15 10:16:07 HORDE [debug] [turba] L</title> 
   <description>Horde debug logs:



May 15 10:16:07 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=shared_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(|(objectclass=top)(objectclass=person)(objectclass=organizationalPerson)(objectclass=inetOrgPerson)(objectclass=turbaContact))&quot;; attributes = &quot;dn, uid, turbaType, turbaMembers, cn, mail, sn, givenName, homephone, telephonenumber, mobiletelephonenumber, homepostaladdress, calFBURL&quot;; deref = &quot;0&quot;  ; sizelimit = 200 [pid 1812 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]

May 15 10:16:07 HORDE [debug] [turba] SQL query by Horde_Alarm_sql::_list(): SELECT alarm_id, alarm_uid, alarm_start, alarm_end, alarm_methods, alarm_params, alarm_title, alarm_text, alarm_snooze, alarm_internal FROM horde_alarms WHERE alarm_dismissed = 0 AND ((alarm_snooze IS NULL AND alarm_start &lt;= ?) OR alarm_snooze &lt;= ?) AND (alarm_end IS NULL OR alarm_end &gt;= ?) AND (alarm_uid = ? OR alarm_uid = ?) ORDER BY alarm_start, alarm_end [pid 1812 on line 148 of &quot;/usr/share/horde/lib/Horde/Alarm/sql.php&quot;]

May 15 10:16:07 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=simon,ou=personal_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(&amp;(turbaType=*Group*))&quot;; attributes = &quot;dn, turbaType, cn, sn&quot;; deref = &quot;0&quot;  ; sizelimit = 0 [pid 1812 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]

May 15 10:16:07 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=shared_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(&amp;(turbaType=*Group*))&quot;; attributes = &quot;dn, turbaType, cn, sn&quot;; deref = &quot;0&quot;  ; sizelimit = 200 [pid 1812 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]

May 15 10:16:10 HORDE [debug] [horde] Connected to the following memcache servers:localhost:11211 [pid 1584 on line 127 of &quot;/usr/share/horde/lib/Horde/Memcache.php&quot;]

May 15 10:16:10 HORDE [debug] [turba] SQL query by Horde_Alarm_sql::_list(): SELECT alarm_id, alarm_uid, alarm_start, alarm_end, alarm_methods, alarm_params, alarm_title, alarm_text, alarm_snooze, alarm_internal FROM horde_alarms WHERE alarm_dismissed = 0 AND ((alarm_snooze IS NULL AND alarm_start &lt;= ?) OR alarm_snooze &lt;= ?) AND (alarm_end IS NULL OR alarm_end &gt;= ?) AND (alarm_uid = ? OR alarm_uid = ?) ORDER BY alarm_start, alarm_end [pid 1584 on line 148 of &quot;/usr/share/horde/lib/Horde/Alarm/sql.php&quot;]

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

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

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

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

May 15 10:16:14 HORDE [debug] [horde] Connected to the following memcache servers:localhost:11211 [pid 1583 on line 127 of &quot;/usr/share/horde/lib/Horde/Memcache.php&quot;]

May 15 10:16:14 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=shared_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(|(objectclass=top)(objectclass=person)(objectclass=organizationalPerson)(objectclass=inetOrgPerson)(objectclass=turbaContact))&quot;; attributes = &quot;dn, uid, turbaType, turbaMembers, cn, mail, sn, givenName, homephone, telephonenumber, mobiletelephonenumber, homepostaladdress, calFBURL&quot;; deref = &quot;0&quot;  ; sizelimit = 200 [pid 1583 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]

May 15 10:16:14 HORDE [debug] [turba] SQL query by Horde_Alarm_sql::_list(): SELECT alarm_id, alarm_uid, alarm_start, alarm_end, alarm_methods, alarm_params, alarm_title, alarm_text, alarm_snooze, alarm_internal FROM horde_alarms WHERE alarm_dismissed = 0 AND ((alarm_snooze IS NULL AND alarm_start &lt;= ?) OR alarm_snooze &lt;= ?) AND (alarm_end IS NULL OR alarm_end &gt;= ?) AND (alarm_uid = ? OR alarm_uid = ?) ORDER BY alarm_start, alarm_end [pid 1583 on line 148 of &quot;/usr/share/horde/lib/Horde/Alarm/sql.php&quot;]

May 15 10:16:14 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=simon,ou=personal_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(&amp;(turbaType=*Group*))&quot;; attributes = &quot;dn, turbaType, cn, sn&quot;; deref = &quot;0&quot;  ; sizelimit = 0 [pid 1583 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]

May 15 10:16:14 HORDE [debug] [turba] LDAP query by Turba_Driver_ldap::_search(): user = simon, root = ou=shared_addressbook,dc=simonandkate,dc=lan (server01.simonandkate.lan); filter = &quot;(&amp;(turbaType=*Group*))&quot;; attributes = &quot;dn, turbaType, cn, sn&quot;; deref = &quot;0&quot;  ; sizelimit = 200 [pid 1583 on line 186 of &quot;/usr/share/horde/turba/lib/Driver/ldap.php&quot;]</description> 
   <pubDate>Fri, 15 May 2009 00:18:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8271#t54162</link> 
  </item> 
   
  <item> 
   <title>There are some notes related to this in Bug: 8270



Also, F</title> 
   <description>There are some notes related to this in Bug: 8270



Also, FWIW, the Ansel ticket cited ( Bug:8269 ) has been resolved, albeit in a non-ideal way (by allow an admin to explicitly disallow attempting to read other user&#039;s prefs if they do not want to provide an appropriate search DN to bind with).



Why this in failing in Turba *after* viewing the contact created by another user then returning to the address book browse view, I&#039;m not sure. My only idea is that maybe by the time the notification is pushed for the bind error, it&#039;s too late to display on the current screen, so it is pushed after the next page reload. I&#039;m not an LDAP guy, nor do I have a LDAP server available to test this theory on...



&gt; Preferences binds are done as the logged on user. Would doing a 

&gt; preferences bind as an LDAP user with permissions to all the required 

&gt; parts of LDAP solve this? 



AFAIK, this is what the search dn is for.



&gt; I would rather bind as the user 

&gt; concerned... seems to be a more &quot;proper&quot; way to do it, and I&#039;d have 

&gt; thought it should work given the option is there.



The problem (as described in the other tickets as well) is that there are parts of Horde where we need to attempt access to another user&#039;s preferences, for example, when retrieving a user&#039;s Identity settings so we can display full names instead of usernames.</description> 
   <pubDate>Thu, 04 Jun 2009 13:54:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8271#t54422</link> 
  </item> 
   
  <item> 
   <title>As I was having this issue across so many of the Horde apps,</title> 
   <description>As I was having this issue across so many of the Horde apps, I changed my LDAP prefs configuration to be as follows (which has resolved the issues for me):



$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;hostspec&#039;] = &#039;server01.simonandkate.lan&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;port&#039;] = 389;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;version&#039;] = &#039;3&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;tls&#039;] = true;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;basedn&#039;] = &#039;dc=simonandkate,dc=lan&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;searchdn&#039;] = &#039;cn=horde,ou=accounts,dc=simonandkate,dc=lan&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;searchpw&#039;] = &#039;********&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;writedn&#039;] = &#039;searchdn&#039;;

$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;uid&#039;] = &#039;uid&#039;;

$conf[&#039;prefs&#039;][&#039;driver&#039;] = &#039;ldap&#039;;



Thus using a more privileged user for prefs access. 



I have made the following notes at http://bugs.horde.org/ticket/8269:



&quot;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;.&quot;







Bind as admin is obviously overkill (but works). Bind as user causes the issues shown here (despite the fact that any user or even anonymous can read any user&#039;s prefs it tries to *bind* as the other user with no password). 



As I&#039;ve mentioned the fact that this is called &#039;writedn&#039; but is used to *read* seems odd to me. 



Hope some of that makes sense! :)

</description> 
   <pubDate>Thu, 04 Jun 2009 23:22:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8271#t54428</link> 
  </item> 
   
  <item> 
   <title>Closed in favor of the catch-all ticket #8353.</title> 
   <description>Closed in favor of the catch-all ticket #8353.</description> 
   <pubDate>Tue, 16 Jun 2009 13:38:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8271#t54607</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
