0
votes

I am trying to create cutom field and object
DN: uid=55e44a75e4b0f16711714165,ou=people,dc=myDB,dc=com

I created ldif file

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: (2.25.128424792425578037463837247958458780603.1
        NAME 'adminStatus'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributeTypes: (2.25.128424792425578037463837247958458780603.2
        NAME 'userStatus'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024})
add: objectClasses
objectClasses: (2.25.128424792425578037463837247958458780603.3
    NAME 'statusPerson'
    DESC 'statusPerson'
    SUP inetOrgPerson
    STRUCTURAL
    MAY  (adminStatus $ userStatus))

When I tried to add file like

ldapadd -x -D cn=admin,dc=myDB,dc=com -W -f Desktop/statusPerson.ldif

it gives error

ldapadd: wrong attributeType at line 6, entry "cn=schema" 
1

1 Answers

0
votes

LDIF specification states that you need a separator when you change the modification type/attribute.

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: (2.25.128424792425578037463837247958458780603.1
        NAME 'adminStatus'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributeTypes: (2.25.128424792425578037463837247958458780603.2
        NAME 'userStatus'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024})
-
add: objectClasses
objectClasses: (2.25.128424792425578037463837247958458780603.3
    NAME 'statusPerson'
    DESC 'statusPerson'
    SUP inetOrgPerson
    STRUCTURAL
    MAY  (adminStatus $ userStatus))