[turba] IMP ldap prefs/Turba personal ldap addresses
Partha
parth11 at yahoo.com
Thu Dec 5 19:23:57 2002
Thanks million-power-n times.........
Partha
--- Lee <lee@disinfo.com> wrote:
> I have a full ldap/turba implementation. Heres the
> requisite info:
>
> turba/config/sources.php:
>
> $vdomain = strtolower(preg_replace('|^mail\.|i', '',
>
> $_SERVER['HTTP_HOST']));
> $usermail=Auth::getAuth();
> $uid = preg_replace('|@.*|i', '', $usermail);
> $pass=Auth::getCredential('password');
>
> /* PRIVATE ADDRESS BOOK */
>
> $cfgSources['private'] = array(
> 'title' => 'Personal Addressbook for ' .
> $uid,
> 'type' => 'ldap',
>
> 'params' => array(
> 'server' => 'ldap.ourcompany.com',
> 'port' => 389,
> 'root' => 'ou=addressbook,uid=' . $uid.
>
> ',ou=users,dc=ourcompany,dc=com',
>
> /*BIND AS USER NOT AS ROOT */
>
> 'bind_dn' => 'uid=' . $uid .
> ',ou=users,dc=ourcompany,dc=com',
> 'bind_password' => $pass,
> 'dn' => array('cn'),
> 'objectclass' => array(
> 'addressBookEntry' ),
> 'encoding' => 'utf8',
> 'version' => 3,
> 'filter' => ''
> ),
>
> 'map' => array(
> '__key' => 'dn',
> 'name' => 'cn',
> 'email' => 'mail',
> 'homePhone' => 'homephone',
> 'workPhone' => 'telephonenumber',
> 'cellPhone' => 'mobile',
> 'homeAddress' => 'postaladdress',
> 'notes' => 'description'
> ),
>
> 'search' => array(
> 'name',
> 'email',
> 'homePhone',
> 'workPhone',
> 'cellPhone',
> 'homeAddress',
> 'notes'
> ),
>
> 'strict' => array(
> 'dn'
> ),
>
> 'public' => true,
> 'readonly' => false,
> 'admin' => array(),
> 'export' => true
> );
>
>
> turba/config/attributes:
>
> $attributes['name'] = array(
> 'type' => 'text',
> 'desc' => _("Name")
> );
> $attributes['alias'] = array(
> 'type' => 'text',
> 'desc' => _("Alias")
> );
> $attributes['email'] = array(
> 'type' => 'email',
> 'desc' => _("Email")
> );
> $attributes['title'] = array(
> 'type' => 'text',
> 'desc' => _("Title")
> );
> $attributes['company'] = array(
> 'type' => 'text',
> 'desc' => _("Company")
> );
> $attributes['homeAddress'] = array(
> 'type' => 'multiline',
> 'desc' => _("Home Address")
> );
> $attributes['workAddress'] = array(
> 'type' => 'multiline',
> 'desc' => _("Work Address")
> );
> $attributes['homePhone'] = array(
> 'type' => 'phone',
> 'desc' => _("Home Phone")
> );
> $attributes['workPhone'] = array(
> 'type' => 'phone',
> 'desc' => _("Work Phone")
> );
> $attributes['cellPhone'] = array(
> 'type' => 'phone',
> 'desc' => _("Cell Phone")
> );
> $attributes['fax'] = array(
> 'type' => 'phone',
> 'desc' => _("Fax")
> );
> $attributes['notes'] = array(
> 'type' => 'multiline',
> 'desc' => _("Notes")
> );
>
>
> horder/config/horde.php:
>
> /**
> ** Preference System Settings
> **/
>
> // What preferences driver should we use? Valid
> values are 'none'
> // (meaning use system defaults and don't save any
> user preferences),
> // 'session' (preferences only persist during the
> login), 'ldap',
> // and 'sql'.
> $conf['prefs']['driver'] = 'ldap';
>
> // Any parameters that the preferences driver needs.
> This includes
> // database or ldap server, username/password to
> connect with, etc.
> $conf['prefs']['params'] = array();
>
> // This is an example configuration for an LDAP
> preference backend.
> // The schemas needed for ldap are in
> horde/scripts/ldap. For more
> // information see sources and comments in
> horde/lib/Prefs/ldap.php.
> $conf['prefs']['driver'] = 'ldap';
> $conf['prefs']['params']['hostspec'] =
> 'ldap.ourcompany.com';
> $conf['prefs']['params']['port'] = '389';
> $conf['prefs']['params']['basedn'] =
> 'ou=users,dc=ourcompany,dc=com';
> $conf['prefs']['params']['uid'] = 'uid';
>
> slapd.conf - ACLS:
>
> # Define global ACLs to disable default read access.
> defaultaccess none
>
> access to
>
dn=".*ou=addressbook,(uid=.+),ou=users,dc=ourcompany,dc=com"
> by dn="$1,ou=users,dc=ourcompany,dc=com"
> write
> by anonymous auth
> by * none
>
> access to *
>
attr=userPassword,cn,sn,givenName,hordePrefs,impPrefs,turbaPrefs,kronoli
>
> thPrefs
> by self write
> by * auth
>
> access to * by self read
> by * auth
>
>
> Schema - We created an auxiliary objectclass with
> the horde attributes
> that we add to inetOrgPerson to make our full user
> accounts. You can do
> this yourself, or you can just make your
> useraccounts hordePerson. (FYI
> not using our real oids below, so I wouldnt copy it.
> You can get oids
> free online if you need to create your own schema).
> Likewise we created
> our own addressbook objectclass. Once again you can
> use a standard
> person, inetOrgPerson or whatever if you dont want
> to have to create
> your own. Just make sure you tell change turba's
> sources:map
> accordingly.
>
> objectclass ( 1.3.6.1.4.1.0.0.00
> NAME 'companyEmailService'
>
=== message truncated ===
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the turba
mailing list