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

Re: ldif, a person with city and country



On 11/22/12 16:27 +1100, Jobst Schmalenbach wrote:
So far I can add entries to LDAP from wordpress, I can login to wordpress using LDAP.

So far I can add enough information for subscribers (billing address, uid, telephone etc) using the standard schemas and object classes, but I need a little mode info for each.
This is what I have:

dn: dc=MyDomain,dc=com,dc=au
dc: MyDomain
objectClass: domain

dn: o=Subscriptions,dc=MyDomain,dc=com,dc=au
o: Subscriptions
objectClass: organization

dn: ou=moodle,o=Subscriptions,dc=MyDomain,dc=com,dc=au
ou: moodle
objectClass: organizationalUnit

dn: uid=gemma, ou=moodle, o=Subscriptions, dc=MyDomain, dc=com, dc=au
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgPerson
objectclass: emailPerson
objectclass: NameViewPerson
cn=Gemma Turtle
sn=Turtle
givenName=Gemma Turtle
uid=gemma
countryCode=AU


I end up with an error "invalid structural object class chain", which I think means the country needs to be higher up the tree, but then I would have to create the tree branches for every country (for each person)?

That error is discussed here:

http://www.openldap.org/doc/admin24/appendix-common-errors.html#ldap%20add:%20invalid%20structural%20object%20class%20chain

The problem is not the structure of your DIT, but rather your choice of
objectClasses:

objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgPerson
objectclass: emailPerson
objectclass: NameViewPerson

person is "SUP top STRUCTURAL"
organizationalPerson is "SUP person STRUCTURAL"
inetOrgPerson is "SUP organizationalPerson STRUCTURAL"

these form a valid structural chain

emailPerson and NameViewPerson do not show up in the list of schemas that I
use, but I suspect one or the other is a Structural objectClass that does
not SUP from inetOrgPerson.

Find out which attributes you need from the offending objectClass, and
consider making a new Auxiliary objectClass containing those attributes.

See chapter 13 of the Administrator's Guide for an example.

--
Dan White