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

getting Friendly country to work in a very simple setup



I am trying to replace our static web based address book with an ldap
based one that will allow us access from programs such as Eudora. I am
using the example that is in the Oreily LDAP System Administration book
with one exception. I am using the inetOrgPerson class but I need to add
an attribute for country

Here is my very simple start

# SLAPD.CONF
#######################################################################
# Global section
#######################################################################
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema

loglevel        296
pidfile         /var/run/slapd.pid
argsfile        /var/run/slapd.args

#######################################################################
# ldbm database definitions
#######################################################################

database        bdb
suffix          "dc=oeddev,dc=org"
rootdn          "cn=Manager,dc=oeddev,dc=org"
rootpw          secret
directory       /data/openldap/oeddev.org

mode            0600

# Indices to maintain
index   objectClass     eq
index   cn              pres,eq

cachesize       2000

access to *
        by * read

# TOP.LDIF
dn: dc=oeddev,dc=org
dc: oeddev
objectclass: dcObject
objectclass: organizationalUnit
ou: OED Development

dn: ou=people,dc=oeddev,dc=org
ou: people
objectclass: organizationalUnit

dn: cn=Manager,dc=oeddev,dc=org
objectclass: organizationalRole
cn: Manager

#OEDDEV.LDIF
dn: cn=Nick Gray,dc=oeddev,dc=org
cn: Nick Gray
sn: Nick
mail: nagray@sd.rr.com
title: Engineer
telephoneNumber: 512-151-7938
facsimileTelephoneNumber: 512-161-2786
street: 1402 Eject Cove
l: Austin
st: Texas
#co: United States
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson

I am following the instructions in the book, except the startup

#/etc/init.d/ldap start
Checking configuration files for : config file testing succeeded
Starting slapd:                                            [  OK  ]
#
#slapadd -v -l /etc/openldap/top.ldif
added: "dc=oeddev,dc=org" (00000001)
added: "ou=people,dc=oeddev,dc=org" (00000002)
added: "cn=Manager,dc=oeddev,dc=org" (00000003)
#
#ldapsearch -x -b "dc=oeddev,dc=org" "(objectclass=*)"
# extended LDIF
#
# LDAPv3
# base <dc=oeddev,dc=org> with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1
#
#ldapmodify -D "cn=Manager,dc=oeddev,dc=org" -w secret \
> -a -x -f /etc/openldap/oeddev.ldif
adding new entry "cn=Nick Gray,dc=oeddev,dc=org"
ldap_add: Object class violation (65)
        additional info: invalid structural object class chain
(friendlyCountry/person)

How do I make this work? I have seen plenty of examples that include
country, but they make it part of the dn. I don't want this, since it is
a minor field for me.

Thanks Nick