[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: A Beginning, Objects not found, more.



Hi,
The netscape address book dump is not fit to base any LDAP tree off of.
It's exported as LDIF so that you can import it into other compatible
address books (e.g. sharing an address book between desktop and laptop when
you don't have a LDAP server setup). You could also write a script that
could take the data and massage it into something that fits your server's
schema (which would be handy if you wanted to allow users to import address
books into your LDAP server).

The address book code always uses LDAP (though if searching local address
book, the API calls are actually accessing a Berkeley DB file locally), but
the local address book isn't a true directory service.

I covered a bit about this in my book "Implementing LDAP".


Mark


-----Original Message-----
From: Roger Gregory <godot@mindspring.com>
To: openldap-general@OpenLDAP.org <openldap-general@OpenLDAP.org>
Date: Wednesday, July 14, 1999 3:48 PM
Subject: A Beginning, Objects not found, more.


>Greetings--
>
>My basic goal is to construct a 'contact-list database', one which does
>not refer outside of itself.  To this end, I've constructed the
>following:
>
>1) exported Netscape's address book, taking care to remove carriage
>returns. And example of the output (from the top-- I have added the
>'host=muse'):
>
>        dn: cn=John Doe, mail=, host=muse
>        modifytimestamp: 19990713173637Z
>        cn: John Doe
>        xmozillausehtmlmail: FALSE
>        sn: Doe
>        givenname: John
>        countryname: United States of America
>        objectclass: top
>        objectclass: person
>
>2) Converted the above ldif as follows:
>
>        ldif2ldbm -i contacts.ldif -f /etc/openldap/slapd.conf
>
>3) Restarted slapd (I've included my slapd.conf below for completeness):
>
>        # This is the main ldapd configuration file.
>
>        # Schema and objectClass definitions
>        include         /etc/openldap/slapd.at.conf
>        include         /etc/openldap/slapd.oc.conf
>
>        # Schema check allows for forcing entries to
>        # match schemas for their objectClasses's
>        schemacheck     off
>
>        # Where clients are refered to if no
>        # match is found locally
>        #referral       ldap://ldap.four11.com
>
>        # Where the pid file is put. The init.d script
>        # will not stop the server if you change this.
>        pidfile         /var/run/slapd.pid
>
>        ##################################
>        # ldbm database definitions
>        ##################################
>
>        # The backend type, ldbm, is the default standard
>        database        ldbm
>
>        # The base of your directory
>        suffix          "host=muse"
>
>        # Where the database file are physically stored
>        directory       "/var/lib/openldap"
>
>        # By default, only read access is allowed
>        defaultaccess   read
>
>        # The userPassword by default can by changed
>        # by the entry owning it if they are authenticated.
>        # Others should not be able to see it, except the
>        # admin entry above
>        access to attribute=userPassword
>        by * none
>        by self write
>
>        # The admin dn has full write access
>        access to * by dn="cn=admin, ou=People, host=muse" write
>
>        # End of ldapd configuration file
>
>4) To test things, I try:
>
>- Netscape address book client (selecting 'offline download' yields the
>following in my logs)
>
>slapd[23268]: conn=0 fd=7 connection from herbert (192.168.1.2)accepted.
>slapd[23269]: conn=0 op=0 SRCH base="" scope=0 filter="(objectclass=*)"
>slapd[23269]: conn=0 op=0 RESULT err=32 tag=101 nentries=0
>slapd[23268]: conn=0 op=-1 fd=7 closed errno=0
>slapd[23270]: conn=0 op=1 UNBIND
>slapd[23268]: conn=1 fd=7 connection from herbert (192.168.1.2)accepted.
>slapd[23299]: conn=1 op=0 SRCH base="" scope=0 filter="(objectclass=*)"
>slapd[23299]: conn=1 op=0 RESULT err=32 tag=101 nentries=0
>slapd[23268]: conn=1 op=-1 fd=7 closed errno=0
>slapd[23300]: conn=1 op=1 UNBIND
>
>- using the ldapsearch tool:
>
>[root - ~] ldapsearch 'objectclass=*'
>ldap_search: No such object
>
>I'm a bit lost at this point: it took me some time to stumble upon the
>fact that Netscape's address book could generate a ldif for me, and
>everything seems working insofar as the daemon is concerned-- thus I'm
>sure I'm missing something basic which I passed over in the
>documentation-- any assistance would be greatly appreciated..
>
>Kind regards--
>
>Roger
>
>----------
>Debian Linux: Go take a peek!
>Http://www.debian.org
>
>PGP Key: 0x0FB46E9D
>
>
>