-----Original Message----- From: Jonathan Clarke [mailto:[email protected]] Sent: Thursday, July 01, 2010 11:03 AM To: Alexander Erameh Cc: [email protected] Subject: Re: Adding Schema
On 01/07/2010 10:05, Alexander Erameh wrote: > On 28/06/2010 10:58, Alexander Erameh wrote: >> Hi, >> >> Just joined this list, so please pardon me for any mistakes. >> >> I have been trying to add "*CourierMailAccount*" object class and >> "*qmailUser*" object class for days without success. I created a schema >> file and defined the Attributetypes and Object classes and added the >> file in the Include statement in slapd.conf but SLAPD does not seem to >> recognize the new object classes. >> >> When I try to add users to the Database using LDAPADD, I get the error >> message below: >> >> *"ldap_add: Invalid syntax (21)* >> >> * additional info: objectClass:value #2 invalid per syntax"* >> >> The #2 objectClass is "qmailuser". >> >> Suggestions and advice will be appreciated. > > After adding the include to slapd.conf, you did restart slapd? > > When adding users via ldapadd, are you sure that there are no trailing > spaces after "objectclass: qmailuser"? > > If your problem still occurs, try posting an excerpt of the LDIF that > fails, and your config. > > > Yes, I restarted slapd, and I have even rebooted the machine several times > since but the problem remains. > I am attaching four files in .txt format. > The file new-attributes.txt contains the new attributes I added. This file > was converted from .schema to .txt. > The file new-object.text contains the new objects I added > The file slapd.txt is my slapd.conf > The file socotherm-africa.txt is the ldif file containing the new users I > want to add to the database. The entries you're trying to add have these objectClasses: > objectClass: top > objectClass: person > objectClass: qmailuser > objectClass: CourierMailAccount > objectClass: inetOrgPerson > objectClass: organizationalPerson However, "person" and "qmailuser" are both structural objectClasses. You can only have one structural objectClass per object. You should probably adapt qmailUser and courierMailAccount to be structural... Note that a confusing side effect of objectClass inheritance (inetOrgPerson extends organizationalPerson which extends person, etc) is that seemingly several structural objectClasses appear in a single entry. This is in effect just one objectClass, the lowermost in the inheritance chain. Pardon me please, are you suggesting I should adapt qmailuser and courierMailAccount NOT to be structural since person is already Structural? Alexander
