Koozali.org: home of the SME Server

LDAP Address Book Issue (Solved)

Offline manegar

  • **
  • 24
  • +0/-0
LDAP Address Book Issue (Solved)
« on: August 18, 2009, 12:26:39 PM »
Hello All,
   After upgrading to 7.4 from 7.3, all users are not able to view/query LDAP address book when composing new mail. I found out that if user adds  “My Address Book” & “Local LDAP” in “Choose which address books to display, and in what order: “ from Options for Address Book, then he/she will be able to query/add LDAP address while composing new mail.

   I have also created a custom template like:

Code: [Select]
mkdir –p /etc/e-smith/templates-custom/home/httpd/html/horde/turba/config/prefs.php

cd /etc/e-smith/templates-custom/home/httpd/html/horde/turba/config/prefs.php

cp /etc/e-smith/templates/home/httpd/html/horde/turba/config/prefs.php/170addressbooks

edited 170addressbooks and changed the ‘value’ => "localsql\nlocalldap" from default ‘localsql’


//170addressbooks
// Address books to be displayed in the address book selection widget
// and in the Browse menu item.  The address book name is stored using
// the source key from sources.php (e.g. "localsql").  Separate
// entries with "\n" , e. g. 'value' => "localsql\nlocalldap" (the
// double quotes are REQUIRED).  If 'value' is empty (''), all address
// books that the user has permissions to will be listed.
$_prefs['addressbooks'] = array(
    'value' => "localsql\nlocalldap",
    'locked' => false,
    'shared' => false,
    'type' => 'implicit',
);

expand-template /home/httpd/html/horde/turba/config/prefs.php

signal-event email-update

Even after this I am not able to view/query LDAP users while composing new mails, however can query/view LDAP address using “Address Book” option in Horde Webmail Main Menu.











Code: [Select]
Message Log:

Aug 18 13:08:40 mail HORDE[3574]: [imp] Login success for nandi [x.x.x.x] to {localhost:143 [imap/notls]} [pid 3574 on line 306 of "/home/httpd/html/horde/imp/lib/Session.php"]
Aug 18 13:08:41 mail slapd[27484]: conn=1319 fd=17 ACCEPT from IP=127.0.0.1:38868 (IP=0.0.0.0:389)
Aug 18 13:08:41 mail slapd[27484]: conn=1319 op=0 BIND dn="" method=128
Aug 18 13:08:41 mails lapd[27484]: conn=1319 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:41 mail slapd[27484]: conn=1319 op=1 UNBIND
Aug 18 13:08:41 mail slapd[27484]: conn=1319 fd=17 closed
Aug 18 13:08:47 mail slapd[27484]: conn=1320 fd=17 ACCEPT from IP=127.0.0.1:38871 (IP=0.0.0.0:389)
Aug 18 13:08:47 mail slapd[27484]: conn=1320 op=0 BIND dn="" method=128
Aug 18 13:08:47 mail slapd[27484]: conn=1320 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:47 mail slapd[27484]: conn=1320 op=1 UNBIND
Aug 18 13:08:47 mail slapd[27484]: conn=1320 fd=17 closed
Aug 18 13:08:48 mail slapd[27484]: conn=1321 fd=17 ACCEPT from IP=127.0.0.1:38872 (IP=0.0.0.0:389)
Aug 18 13:08:48 mail slapd[27484]: conn=1321 op=0 BIND dn="" method=128
Aug 18 13:08:48 mail slapd[27484]: conn=1321 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:48 mail slapd[27484]: conn=1321 op=1 UNBIND
Aug 18 13:08:48 mail slapd[27484]: conn=1321 fd=17 closed
Aug 18 13:08:50 mail slapd[27484]: conn=1322 fd=17 ACCEPT from IP=127.0.0.1:38875 (IP=0.0.0.0:389)
Aug 18 13:08:50 mail slapd[27484]: conn=1322 op=0 BIND dn="" method=128
Aug 18 13:08:50 mail slapd[27484]: conn=1322 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:50 mail slapd[27484]: conn=1322 op=1 UNBIND
Aug 18 13:08:50 mail slapd[27484]: conn=1322 fd=17 closed
Aug 18 13:08:52 mail slapd[27484]: conn=1323 fd=17 ACCEPT from IP=127.0.0.1:38876 (IP=0.0.0.0:389)
Aug 18 13:08:52 mail slapd[27484]: conn=1323 op=0 BIND dn="" method=128
Aug 18 13:08:52 mail slapd[27484]: conn=1323 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:52 mail slapd[27484]: conn=1323 op=1 UNBIND
Aug 18 13:08:52 mail slapd[27484]: conn=1323 fd=17 closed
Aug 18 13:08:53 mail slapd[27484]: conn=1324 fd=17 ACCEPT from IP=127.0.0.1:38877 (IP=0.0.0.0:389)
Aug 18 13:08:53 mail slapd[27484]: conn=1324 op=0 BIND dn="" method=128
Aug 18 13:08:53 mail slapd[27484]: conn=1324 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:53 mail slapd[27484]: conn=1324 op=1 UNBIND
Aug 18 13:08:53 mail slapd[27484]: conn=1324 fd=17 closed
Aug 18 13:08:54 mail slapd[27484]: conn=1325 fd=17 ACCEPT from IP=127.0.0.1:38878 (IP=0.0.0.0:389)
Aug 18 13:08:54 mail slapd[27484]: conn=1325 op=0 BIND dn="" method=128
Aug 18 13:08:54 mail slapd[27484]: conn=1325 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:54 mail slapd[27484]: conn=1325 op=1 UNBIND
Aug 18 13:08:54 mail slapd[27484]: conn=1325 fd=17 closed
Aug 18 13:08:56 mail slapd[27484]: conn=1326 fd=17 ACCEPT from IP=127.0.0.1:38879 (IP=0.0.0.0:389)
Aug 18 13:08:56 mail slapd[27484]: conn=1326 op=0 BIND dn="" method=128
Aug 18 13:08:56 mail slapd[27484]: conn=1326 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:56 mail slapd[27484]: conn=1326 op=1 UNBIND
Aug 18 13:08:56 mail slapd[27484]: conn=1326 fd=17 closed
Aug 18 13:08:58 mail slapd[27484]: conn=1327 fd=17 ACCEPT from IP=127.0.0.1:38881 (IP=0.0.0.0:389)
Aug 18 13:08:58 mail slapd[27484]: conn=1327 op=0 BIND dn="" method=128
Aug 18 13:08:58 mail slapd[27484]: conn=1327 op=0 RESULT tag=97 err=0 text=
Aug 18 13:08:58 mail slapd[27484]: conn=1327 op=1 UNBIND
Aug 18 13:08:58 mail slapd[27484]: conn=1327 fd=17 closed
Aug 18 13:09:00 mai lHORDE[6920]: [imp] Logout for nandi [x.x.x.x] to {localhost:143 [imap/notls]} [pid 6920 on line 68 of "/home/httpd/html/horde/imp/login.php"]
                                                                           


Please let me know if can add globally “Local LDAP” & “My Address Book” in the option of Webmail -->Options --> (Edit options for :) Address Book --> Address Books --> “Choose which address books to display, and in what order:”           
         
Reference:
http://forums.contribs.org/index.php/topic,42781.0.html 
http://forums.contribs.org/index.php/topic,43381.0.html
http://bugs.contribs.org/show_bug.cgi?id=4819
http://bugs.contribs.org/show_bug.cgi?id=5020
                                                     

My Server Info:

SME Server 7.4
Server-Only Mode

Contribs: (Installed as per Howto)

User Panel Access
User vacation
Roundcube


Thanks in Advance

Ivy
« Last Edit: August 19, 2009, 07:03:16 AM by manegar »

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Re: LDAP Address Book Issue
« Reply #1 on: August 19, 2009, 03:52:43 AM »
Ivy,

Once these settings are set, they are stored in the mysql database.  You could try from the command line:
Code: [Select]
mysql
connect horde;
update horde_prefs set pref_value = 'localsql\nlocalldap' where pref_scope = 'turba' and pref_name= 'addressbooks';

But, this should be removed on the next post-upgrade, reboot.  It causes issues with shared address books.

I'm pretty sure if you look at the users you have changed, you won't see their settings as localsql\nlocalldap.  You can verify this by:
Code: [Select]
mysql
connect horde;
select * from horde_prefs where pref_scope = 'turba' and pref_name = 'addressbooks';

John
......

Offline manegar

  • **
  • 24
  • +0/-0
Re: LDAP Address Book Issue
« Reply #2 on: August 19, 2009, 07:02:48 AM »
John,
     Thank you very much for the solution. Now all my users are able to access the ldap address book.
Quote
But, this should be removed on the next post-upgrade, reboot.  It causes issues with shared address books.

Can you please elaborate the issues caused to shared address books (as of now I do not have any shared address books) and also please let me know how to remove if there is any problem, let me know if this code is ok to remove the current setting ? ( I am sorry I am not good @ SQL)

Code: [Select]
mysql
connect horde;
update horde_prefs set pref_value = '' where pref_scope = 'turba' and pref_name= 'addressbooks';

Also please let me know if I have to do a post-upgrade & reboot (as I don't have shared address books).

Thanks again for the help & support.


Ivy


Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Re: LDAP Address Book Issue (Solved)
« Reply #3 on: August 20, 2009, 02:25:49 AM »
No post-upgrade and reboot is needed if you make those changes.  All a user will have to do is logout, then back into webmail.

I can't remember the exact issue with shared addressbooks, but I believe they just wouldn't work.

I'd have to re-look at that, or you could if you have time.

John
......