我一直在尝试通过脚本从本地 openDJ 实例中删除 objectsClasses 和 attributeTypes。目标是创建一组脚本来销毁然后重新创建服务器,以便在发生更改时每个开发人员/实例都可以简单地运行脚本并准备就绪。我已经成功地使用完整定义删除了对象和属性,但是当我尝试使用 ObjectID 时,它无法找到对象/属性。
"Entry cn=schema cannot be modified because the attempt to update objectClasses would have removed one or more values from the attribute that were not present: (1.1.2.2.2) "
工作 ldif:
dn: cn=schema
changetype: modify
delete: objectClasses
objectclasses: ( 1.1.2.2.2 NAME 'tstPerson'
DESC 'Person object'
SUP inetOrgPerson
STRUCTURAL
MUST ( name )
MAY ( unit )
)
dn: cn=schema
changetype:modify
delete:attributeTypes
attributeTypes: (2.16.3.1.1
NAME 'unit'
DESC 'identifies the unit or units a person has been assigned'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
缩短非工作:
dn: cn=schema
changetype: modify
delete: objectClasses
objectclasses: ( 1.1.2.2.2 )
dn: cn=schema
changetype:modify
delete:attributeTypes
attributeTypes: ( 2.16.3.1.1 )
问题是,为了删除一个 objectClass 或属性,是否需要提供 objectClass 或属性的完整定义,或者有没有办法用名称或 OID 来专门标识 objectClass 或属性?