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

Re: problems adding indexs

Howard Chu <hyc@symas.com> writes:

> Ferenc Wagner wrote:
>> Greg Jetter <gjetter@gci.com> writes:
>>> dn: olcDatabase={1}hdb,cn=config
>>> add: olcDbIndex
>>> olcDbIndex: cdmadauserstatus eq
>> Are you sure the attribute name (cdmadauserstatus) is spelled correctly?
>> Other that that, your LDIF seems sane.
> No, the LDIF is incorrect. Jephte's response was correct.
> http://www.openldap.org/lists/openldap-technical/201503/msg00026.html

With due respect, let me quote from man ldapmodify:

   ldapadd is implemented as a hard link to the ldapmodify tool.  When
   invoked as ldapadd the -a (add new entry) flag is turned on
   -a   Add new entries.  The default for ldapmodify is to modify existing
        entries.  If invoked as ldapadd, this flag is always set.

And indeed, I routinely leave out the changetype: modify line when using
ldapmodify.  I've even got the following index.ldif handy:

dn: olcDatabase={1}mdb,cn=config
delete: olcDbIndex
olcDbIndex: entryUUID,gidNumber,[...],uidNumber,uniqueMember pres,eq
add: olcDbIndex
olcDbIndex: entryCSN,entryUUID,gidNumber,[...],uidNumber,uniqueMember pres,eq

corresponding to this history entry:

$ sudo ldapmodify -Y external -H ldapi:// -f index.ldif

So it worked without the changetype line.  Also, the error message:

> ldapmodify: wrong attributeType at line 3, entry

either talks about olcDbIndex or cdmadauserstatus, but the former is
certainly valid.

Anyway: is leaving out changetype unsupported usage?  Or discouraged,
OpenLDAP specific?