[turba] Edit OpenLDAP address book

Edwin Culp eculp@encontacto.net
Wed, 22 May 2002 09:35:14 -0700


Andreas,

This is very interesting.  I had this problem so long ago I had forgotten
about it.  So before I tell you what i did, I would recommend that you NOT
use it but I don't know what others have done.

In your error message you see:

May 22 17:20:12 labor3 slapd[23789]: Entry (cn=Markus
Niedermeier,dc=onsitech,dc=ch): object class 'person' requires attribute
'sn'
May 22 17:20:12 labor3 slapd[23789]: conn=4 op=1 RESULT tag=105 err=65
text=object class 'person' requires attribute 'sn'
Quoting Meile Andreas <Andreas.Meile@onsite.ch>:

The person object class requires sirName or sn.  You can change
your core.schema with the following patch:

--- core.schema.default Tue Feb 12 11:30:18 2002
+++ core.schema Mon Apr  1 06:57:52 2002
@@ -368,8 +368,8 @@
                postalAddress $ physicalDeliveryOfficeName $ st $ l $
description ) )
 
 objectclass ( 2.5.6.6 NAME 'person' SUP top STRUCTURAL
-       MUST ( sn $ cn )
-       MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )
+       MUST cn
+       MAY ( sn $ userPassword $ telephoneNumber $ seeAlso $ description ) )
 
 objectclass ( 2.5.6.7 NAME 'organizationalPerson' SUP person STRUCTURAL
        MAY ( title $ x121Address $ registeredAddress $ destinationIndicator $
 

 
Don't forget to reset slapd.  It shouldn't cause any major problems. 

ed


| Dear Turba users
| 
| I recently installed Turba together with IMP (stable 3.1 version) on a SuSE
| Linux 7.3 Professional box together with the "openldap2" package. According
| to http://www.openldap.org/doc/admin/quickstart.html I setup a test
| environment with rootdn user and with the "inetorgperson.schema" (shipped
| with OpenLDAP) and created some fictive person objects using LDIF and
| "ldapadd". After that, according to
| http://www.openldap.org/doc/admin/quickstart.html I setup Horde, IMP and
| Turba.
| 
| To be able access to my LDAP directory, I added a section
| 
| $cfgSources['onsiteLDAP'] = array(
|     'title' => 'My own LDAP directory',
|     'type' => 'ldap',
|     'params' => array(
|         'server' => 'localhost',
|         'port' => 389,
|         'root' => 'dc=onsite,dc=ch',
|         'username' => 'cn=Manager',
|         'password' => 'secret',
|         'dn' => array('cn'),
|         'objectclass' => 'person',
|         'filter' => ''
|     ),
|     'map' => array(
|         '__key' => 'dn',
|         'name' => 'cn',
|         'email' => 'mail',
|         'alias' => 'givenname'
|     ),
|     'search' => array(
|         'name',
|         'email',
|         'alias' => 'givenname'
|     ),
|     'search' => array(
|         'name',
|         'email',
|         'alias'
|     ),
|     'strict' => array(
|         'dn'
|     ),
|     'public' => false,
|     'readonly' => false,
|     'export' => false
| );
| 
| to the /usr/horde/turba/config/sources.php file. This address book works
| fine when I try to search people in it, but when I wish to add an entry,
| then I get an error message
| 
| "There was an error adding this object. Contact your system administrator
| for further help."
| 
| on the Web browser after submit the HTML form containing the new record.
| 
| I increased the slapd's loglevel to 440 and get the following output:
| 
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on 1 descriptors
| May 22 17:20:12 labor3 slapd[23787]: daemon: new connection on 9
| May 22 17:20:12 labor3 slapd[23787]: daemon: conn=4 fd=9 connection from
| IP=::1 33498 (IP=:: 34049) accepted.
| May 22 17:20:12 labor3 slapd[23787]: daemon: added 9r
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on:
| May 22 17:20:12 labor3 slapd[23787]:
| May 22 17:20:12 labor3 slapd[23787]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on 1 descriptors
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on:
| May 22 17:20:12 labor3 slapd[23787]:  9r
| May 22 17:20:12 labor3 slapd[23787]:
| May 22 17:20:12 labor3 slapd[23787]: daemon: read activity on 9
| May 22 17:20:12 labor3 slapd[23788]: conn=4 op=0 BIND dn="" method=128
| May 22 17:20:12 labor3 slapd[23788]: conn=4 op=0 RESULT tag=97 err=0 text=
| May 22 17:20:12 labor3 slapd[23787]: daemon: select: listen=6
| active_threads=1 tvp=NULL
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on 1 descriptors
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on:
| May 22 17:20:12 labor3 slapd[23787]:  9r
| May 22 17:20:12 labor3 slapd[23787]:
| May 22 17:20:12 labor3 slapd[23787]: daemon: read activity on 9
| May 22 17:20:12 labor3 slapd[23789]: conn=4 op=1 ADD dn="CN=MARKUS
| NIEDERMEIER,DC=ONSITECH,DC=CH"
| May 22 17:20:12 labor3 slapd[23789]: Entry (cn=Markus
| Niedermeier,dc=onsitech,dc=ch): object class 'person' requires attribute
| 'sn'
| May 22 17:20:12 labor3 slapd[23789]: conn=4 op=1 RESULT tag=105 err=65
| text=object class 'person' requires attribute 'sn'
| May 22 17:20:12 labor3 slapd[23787]: daemon: select: listen=6
| active_threads=1 tvp=NULL
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on 1 descriptors
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on:
| May 22 17:20:12 labor3 slapd[23787]:  9r
| May 22 17:20:12 labor3 slapd[23787]:
| May 22 17:20:12 labor3 slapd[23787]: daemon: read activity on 9
| May 22 17:20:12 labor3 slapd[23788]: conn=4 op=2 UNBIND
| May 22 17:20:12 labor3 slapd[23788]: daemon: removing 9
| May 22 17:20:12 labor3 slapd[23788]: conn=-1 fd=9 closed
| May 22 17:20:12 labor3 slapd[23787]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| May 22 17:20:12 labor3 slapd[23787]: daemon: activity on 1 descriptors
| May 22 17:20:12 labor3 slapd[23787]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| 
| It would be nice if somebody could point me out how to modify
| /usr/horde/turba/config/sources.php or /etc/openldap/slapd.conf or some
| other configuration file to get the edit address book feature to work.
| 
| Any assistance are appreciated. :-)
| 
|           Andreas
| -- 
| Andreas Meile, Abt. Systementwicklung, Tel. direkt: +41 52 260 34 94
| onsite solutions ag, Archstrasse 2, CH-8401 Winterthur (Switzerland)
| Tel. +41 52 260 34 70 Fax +41 52 214 07 80
| e-Mail: info@onsite.ch WWW: http://www.onsite.ch/
| 
| -- 
| Turba mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: turba-unsubscribe@lists.horde.org
| 


-----------------------------------------------------------------------
       The illiterate of the 21st century will not be
             those who cannot read and write,
       but those who cannot learn, unlearn and relearn.
                                                --Alvin Toffler

-------------------------------------------------------------
 http://insourcery.com - Mergence of Business and Technology  
          a "Griffin Plaza Partners, LLC" Company