[turba] ldap address book configuration
Guillaume Barreau
g.barreau at gmail.com
Mon Jul 11 06:16:08 PDT 2005
Hello all,
I have been installed turba (version 2.0.2) both at work and at home.
Being new to horde, I was impressed by how easy to install and
understand the whole thing is. Congratulations to all!
However, there is one issue which is out of tune with the general
smoothness I have experienced. It has to do with configuring sources
for ldap in sources.php.
The example of a shared ldap directory that comes in sources.php.dist
(localldap) does not work out of the box and causes an "object
violation" error when you try to add a contact. The reason, I ended up
finding out from other posts on this list, is that contacts are
entered in the ldap directory as 'person' and that kind of objects
mandates an 'sn' field which in the distribution example is not set.
Shouldn't that be fixed? It seems confusing to give an example that is
not functional at heart.
Now in the scripts directory there is a patch to the core ldap schema
which will redefine the class 'person' so that the sn field becomes
optional. To me that seems like a really bad way of getting things to
work. It is not at all in the ldap spirit to have users redefine the
core schemas. There is instead a simple mechanism to create new
schemas if you don't like the ones provided.
But in any case, the best solution to get the example to work would be
to find a way to put something in the sn field. One way I got it to
work was to move to a situation where users have to provide a
firstName and lastName (as opposed to just one Name entry) and put
lastName in the sn field. That can be done by changing sources.php and
attributes.php pretty easily.
Even better would be to find a solution which would work with a single
name field. One way would be to map the name attribute to both the cn
and sn attributes in ldap. I have tried putting both:
'name' => 'cn',
'name' => 'sn',
in sources.php but that didn't work. Does anybody know how to do that?
Another way to solve the problem would be to use the following fields
// check if all required attributes for an entry are set and add them
// if needed.
'checkrequired' => true,
// string to put in missing required attributes.
'checkrequired_string' => ' ',
which seem perfect for putting ' ' into sn so that no violation
occurs. However, when I tried to set it to true, the following error
arises:
Fatal error: _checkrequiredattributes(): Failed opening required
'Net/LDAP.php' (include_path='/var/www/horde/lib:.:/usr/share/php:/usr/share/pear')
in /var/www/horde/turba/lib/Driver/ldap.php on line 519
Any ideas how to fix that? Do people agree that having a non-working
example is a bad idea? And that sugesting a change to core.schema is
an even worse one?
Guillaume
More information about the turba
mailing list