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

help setting up netscape address book server.



Hi all,

I'm quite new to LDAP, and I've been attempting to set it up for a
client of ours. They want to have an ldap server for netscape address
book info. So, I've read various docs on the topic including the
openldap-howto, the administrators guide, and a rather helpful document
at
http://www.oswg.org/oswg-nightly/oswg/en_US.ISO_8859-1/articles/exchange-replacement-howto/exchange-replacement-howto.html#AEN237
I also discovered that netscape itself will output ldif files, so I've
been looking at those.

Anyway, I've been writing a perl script which gives me output like the
following:

dn: o=Company, c=AU
o: Company
l: Sydney
st: NSW
st: New South Wales
postalcode: 1234
postofficebox: 63 Rhode St.
c: Australia
telephonenumber: 02-8921-8932
objectclass: top
objectclass: organization

dn: cn=example person, o=Company, c=AU
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: example person
sn: person
givenname: example
locality: Sydney
st: NSW
mail: example.person@company.com.au
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0
o: Company, c=AU
description: Administration Manager
countryname: Australia
telephonenumber: 01 2341 4312
homephone: 01 2340 3242
cellphone: 2341 213 234
xmozillaanyphone: 02 3241 2341

and it has copies of that second block for each user in the clients
database. Ok, now I've setup openldap much like the link given above,
here's the slapd.conf file:

[root@brio openldap]# egrep -v "^#.*|^$" slapd.conf
include         /usr/local/etc/openldap/schema/core.schema
include     /usr/local/etc/openldap/schema/cosine.schema
include     /usr/local/etc/openldap/schema/nis.schema
include     /usr/local/etc/openldap/schema/misc.schema
include     /usr/local/etc/openldap/schema/inetorgperson.schema
include     /usr/local/etc/openldap/schema/java.schema
schemacheck     off
pidfile         /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args
database        ldbm
suffix  "o=Company, c=AU"
directory       /usr/local/var/openldap-ldbm
rootdn  "cn=root, o=Company, c=AU"
rootpw  secret
index objectClass, eq
lastmod on
defaultaccess read
access to dn="cn=Administrators, o=Company, c=AU"
        by dnattr=member selfwrite
        by * none
access to dn="*, o=Company, c=AU"
        by self write
        by dn="cn=root, o=Company, c=AU" write
        by * read
access to attr=userPassword
        by self write
        by dn="cn=root, o=Company, c=AU" write
        by * compare
[root@brio openldap]# 

So, I run ldapadd like so (where the above ldif data is the file
staff.ldif):

[root@brio /root]# ldapadd -v -D "cn=root,o=Company,c=AU" -W -f
staff.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password: 
add o:
        Company
add l:
        Sydney
add st:
        NSW
        New South Wales
add postalcode:
        1234
add postofficebox:
        63 Rhode St.
add c:
        Australia
add telephonenumber:
        02-8921-8932
add objectclass:
        top
        organization
adding new entry "o=Company, c=AU"
modify complete

add objectclass:
        top
        person
        organizationalPerson
        inetOrgPerson
add cn:
        example person
add sn:
        person
add givenname:
        example
add locality:
        Sydney
add st:
        NSW
add mail:
        example.person@company.com.au
add xmozillausehtmlmail:
        FALSE
add xmozillauseconferenceserver:
        0
add o:
        Company, c=AU
add description:
        Administration Manager
add countryname:
        Australia
add telephonenumber:
        01 2341 4312
add homephone:
        01 2340 3242
add cellphone:
        2341 213 234
add xmozillaanyphone:
        02 3241 2341
adding new entry "cn=example person, o=Company, c=AU"
ldap_add: Undefined attribute type
        additional info: attribute type undefined

ldif_record() = 17
[root@brio /root]# 

Now, I have a vague understanding of how this is all supposed to work,
and as far as I can see, the ldif file above is equivalent to any of the
examples I've seen. So, what's the problem? Why can't I insert these
entries in the database?

Any help would be greatly appreciated.

Thankyou.

James.