我是LDAP新手,並且尋找添加簡單的objectClass和Attributes,但仍然出現錯誤, 我想要一個包含簡單字符串屬性'functionId'的對象'adminFunc'我複製adminFunc.schema和adminFunc.ldif到架構文件夾:在openLDAP中創建一個新的ObjectClass和屬性
adminFunc.schema:
objectidentifier adminFuncSchema 1.3.6.1.4.1.X.Y
objectidentifier funcAttrs adminFuncSchema:3
objectidentifier funcClass adminFuncSchema:4
attributetype (funcAttrs:2
NAME 'functionId'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
ORDERING caseIgnoreOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255})
objectclass (
funcClass:1
NAME 'adminFunc'
DESC 'Admin permission'
SUP (top) AUXILIARY
MAY functionId)
adminFunc.ldif:(已經由運行slaptest即可自動生成)
dn: cn=adminFunc
objectClass: olcSchemaConfig
cn: adminFunc
olcObjectIdentifier: adminFuncSchema 1.3.6.1.4.1.X.Y
olcObjectIdentifier: funcAttrs adminFuncSchema:3
olcObjectIdentifier: funcClass adminFuncSchema:4
olcAttributeTypes: (funcAttrs:2 NAME 'functionId' EQUALITY caseIgnoreMat
ch ORDERING caseIgnoreOrderingMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX
1.3.6.1.4.1.1466.115.121.1.15{255})
olcObjectClasses: (funcClass:1 NAME 'adminFunc' DESC 'Admin permission'
SUP top AUXILIARY MAY functionId)
structuralObjectClass: olcSchemaConfig
entryUUID: c43389f4-0bfb-1037-959b-c9dc976d6fc3
creatorsName: cn=config
createTimestamp: 20170802182555Z
entryCSN: 20170802182555.047279Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20170802182555Z
modify.ldif 我的DN爲ou =本地,OU = SV,DC =例如,DC = com的
試圖運行這個命令來創建一個新的Call_Center對象:
的ldapmodify -x -W -D 「CN = ldapadmin,DC =例如,DC = COM」 -f modify.ldif
dn: cn=Call_Center,ou=Local,ou=SV,dc=example,dc=com
changetype: add
objectClass: top
objectClass: adminFunc
cn: Call_Center
functionId: 1010
但找不到我adminFunc對象:
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=Call_Center,ou=Local,ou=SV,dc=example,dc=com"
ldap_add: Invalid syntax (21)
additional info: objectClass: value #1 invalid per syntax
不知道我錯過了什麼。
感謝