Re: [Evolution] Evolution and OpenLDAP



On Wed, 2002-10-09 at 06:47, Bosko Radivojevic wrote: 
Hello!

Where can I find some kind of documentation (howto, faq, whatever) about
LDAP connectivity? How can I add new contacts through evolution to ldap?
(tried to make defaultaccess write, and so;)

Greetings


I recently set up LDAP and Cyrus IMAP as a hopeful replacement to an
Exchange server.  Here's how I got LDAP working...  BTW, this may be
horribly wrong, but it has worked so far :) 

I am using RedHat 7.3 and OpenLDAP-2.0.23. 

(1) Make sure the LDAP server is stopped with a 'service ldap stop' (or
/etc/rc.d/init.d/ldap stop) 
(2) Edit your /etc/openldap/slapd.conf to look something like: 


   include /etc/openldap/schema/core.schema 
   include /etc/openldap/schema/cosine.schema 
   include /etc/openldap/schema/inetorgperson.schema 

   database ldbm 
   suffix "dc=domainname,dc=com"        <-- If your organization is
                                        <-- newldap.org then set this to
                                        <-- 'dc=newldap,dc=org' from
                                        <-- here on out
   rootdn "cn=root,dc=domainname,dc=com" 
   rootpw secret                        <-- The password you want
   directory /var/lib/ldap/domainname   <-- Use this in Step #3
   defaultaccess read 
   schemacheck off 
   lastmod on 
   index cn,sn   pres,eq                <-- I have no idea what is
                                        <-- a good indexing scheme.

(3) Create the database directory by 'mkdir /var/lib/ldap/domainname' 
(4) Set permissions with 'chown ldap:ldap /var/lib/ldap/domainname' 
(5) The ldap service can be started again 'service ldap start' 
(6) As a minimum, one objectclass needs to be added.  After that is
done, contacts can be added directly through Evolution.  I will give two
different examples. 

Example #1: 

Create an ldif file called /tmp/new.ldif with the following: 

   dn: dc=domainname, dc=com 
   o: domainname 
   objectclass: organization 

Load it into the LDAP server with: 

   ldapadd -x -D "cn=root,dc=domainname,dc=com" -v -w secret <
/tmp/new.ldif 

If this is sufficient for you to hand enter your contacts into Evolution
then proceed to step (7).  Otherwise, Example #2 demonstrates how to
create a full contact in an ldif file with all the attributes I got to
work without changing/modifying or extending schema. 

Example #2: 

Create an ldif file called /tmp/new.ldif with the following: 

   dn: dc=domainname, dc=com
   o: domainname
   objectclass: organization

   dn: cn=John Doe, dc=coldmetal, dc=com                <-- Dist Name
   cn: John H. Doe                                      <-- Full Name
   sn: Doe                                              <-- Last Name
   givenName: Johnny                                    <-- Nick Name
   ou: MIS                                              <-- Deparment
   title: Systems-Admin                                 <-- Title
   organizationName: John Doe Enterprises                       
   homePostalAddress: ???? Some St.$Some City, CA  98765        <-- Home
Address
                                                        <-- Can't figure
                                                        <-- out how to
                                                        <-- make the new
                                                        <-- line work!!
   homePhone: 800 555-5555                      <-- Home Phone # 
   mobile: 123 456-7890                         <-- Mobile Phone #
   telephoneNumber: 888 888-8888                <-- Business Phone #
   facsimileTelephoneNumber: 777 777-7777       <-- Business Fax #
   labeledURI: www.somedomain.com               <-- Home page
   mail: johndoe domainname com          <-- Email Address
   objectclass:top                      <-- Object Classes as Evolution
                                        <-- adds them!!
   objectclass:person 
   objectclass:organizationalPerson 
   objectclass:inetOrgPerson 


Load it into the LDAP server with: 

   ldapadd -x -D "cn=root,dc=domainname,dc=com" -v -w secret <
/tmp/new.ldif 

(7) Now, you need to decide how to set up the address book in
Evolution.  If you do not authenticate with the LDAP server, you can not
modify contacts in Evolution.  This is desirable for most end users.  As
the Administrator, you can authenticate and make any changes as
needed!!  To set up the address book, click on Tools, and then
AddressBook sources (for Evo 1.0.8).
(8) For the Account Name, make it anything you want.  In our case, I
called it Domainname.
(9) For the Server Name, set it to the hostname or IP of the LDAP
server.
(10) If you want to modify the contacts, check Authenticate with
Distinguished Name (DN).  In our example, set the Distinguished Name box
to 'cn=root,dc=domainname,dc=com'.
(11) Change to the Advanced Tab and then set the Search Base to
'dc=domainname,dc=com'.

That should really do it!!  This is still a work in progress and any
input or other suggestions would be greatly appreciated.  I used the GQ
LDAP Client to help debug alot of this.  I also set this up on Evo
1.1.2.99 yesterday and it only needed minor configuration changes and
worked great!!  In 1.1.2.99, Make sure that in
Tools->Settings->Folder-Settings->Autocompletion-Folders that you
include your new LDAP directory so you just type a few letters of a
contacts name and it will fill it in for you!!

Craig





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]