[turba] 3 Qs & 1 A (all ldap)

Edwin Culp eculp@encontacto.net
Thu, 23 May 2002 05:44:42 -0700


Quoting Tarjei Huse <tarjei+a_lists.phpgw@nu.no>:

| Hi, I got some questions and an answer to some turba setup problems.
| 
| 
| Q: I want to put the personal adressbooks of my users into a ldap
| directory. Now, to do this, I need to make them log on to the server w/
| the same username and password as they used to log on to imp. How do I
| configure my sources.php to do this.
| 
| i.e. I need something like this:
| 'root' => 'ou=$Username,ou=adresses,o=domain,c=com',
|         'bind_dn' => 'uid=$Username,ou=People,o=domain,c=com',
|         'bind_password' => '$password',
| 
| How do I get those $vars?

I don't understand quite why.  You may not need it, IMO.

| 
| Q: How hard is it for turba to create a  "ou" in a directory if it
| doesn't exist, f.x. when the user looks at his/hers adressbook for the
| first time?

Wouldn't their address book be empty when they look at it and if they
haven't saved an entry?  If they have saved an entry you put the ou
automatically such as the following or at least I do:
 'root' => 'mail=' . Auth::getAuth() . ',ou=addressbook,o=mydomain.o
rg',
I give all personal addressbook entries the following dn
cn=the person added,mail=owneremail@mydomain.org,ou=addressbook,o=mydomain.org
It makes it easy to not confuse virtual domains, users, etc.  The email should
alway be unique.   Auth::getAuth() returns the complete email address of the
user.

| 
| Q: How do I get the ldap import/export + adressbooks to work with
| OpenLdap?
| A:
| You'll need to use the pilotperson objectclass. It is also a good ide to
| use the organasationalPerson (or something like that - the last taken
| from the top of my head).
| 
| Change sources.php
| from:
| 'objectclass' =>  'person',
| to
| 'objectclass' =>  array( 'person','pilotPerson' ),
| 
| Q: Has anyone had any sucess in mapping all the turba items (notes, fax
| etc) to ldap attributes? I tried but there werre some problems. More on
| this.

If I understand you correctly, I map them.

You only need to have corresponding entries in both sources and attributes.php.
If I remember correctly, the entrys are case sensistive.  You can add as many
as you like, AFAIK.

Mine follows:
from sources.php:
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'sirname' => 'sn',
        'title' => 'title',
        'company' => 'o',
        'businesscategory' => 'businesscategory',
        'companyaddress' => 'postaladdress',
        'zip' => 'postalcode',
        'workphone' => 'telephonenumber',
        'fax' => 'facsimiletelephonenumber',
        'homeaddress' => 'homepostaladdress',
        'city' => 'l',
        'state' => 'st',
        'homephone' => 'homephone',
        'cellphone' => 'mobile',
        'alias' => 'givenname',
        'notes' => 'description',
        'pgpPublicKey' => 'object_pgppublickey'

and from attributes.php

$attributes['name'] = array(
    'type' => 'text',
    'desc' => _("Name")
);
$attributes['email'] = array(
    'type' => 'email',
    'desc' => _("Email")
);
$attributes['sirname'] = array(
    'type' => 'text',
    'desc' => _("Last Name")
);
$attributes['title'] = array(
    'type' => 'text',
    'desc' => _("Title")
);
$attributes['company'] = array(
    'type' => 'text',
    'desc' => _("Company")
);
$attributes['businesscategory'] = array(
    'type' => 'text',
    'desc' => _("businessCategory")
);
$attributes['companyaddress'] = array(
    'type' => 'multiline',
    'desc' => _("Company Address")
);
$attributes['zip'] = array(
    'type' => 'text',
    'desc' => _("Zip Code")
);
$attributes['workphone'] = array(
    'type' => 'phone',
    'desc' => _("Work Phone")
);
$attributes['fax'] = array(
    'type' => 'phone',
    'desc' => _("Fax")
);
$attributes['homeaddress'] = array(
    'type' => 'multiline',
    'desc' => _("Home Address")
);
$attributes['city'] = array(
    'type' => 'text',
    'desc' => _("City")
);
$attributes['state'] = array(
    'type' => 'text',
    'desc' => _("State")
);
$attributes['homephone'] = array(
    'type' => 'phone',
    'desc' => _("Home Phone")
);
$attributes['cellphone'] = array(
    'type' => 'phone',
    'desc' => _("Cell Phone")
);
$attributes['alias'] = array(
    'type' => 'text',
    'desc' => _("Alias")
);
$attributes['notes'] = array(
    'type' => 'multiline',
    'desc' => _("Notes")
);
$attributes['pgpPublicKey'] = array(
    'type' => 'multiline',
    'desc' => _("PGP Public Key")
);

I hope this addresses your issues and is of some help.

ed

| 
| Thank you for your help.
| 
| Tarjei
| ____________________
| Tarjei Huse
| 920 63 413
| 
| 
| 
| 
| -- 
| 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