我试图将自己的架构添加到OpenLDAP,但是当我转换.schema - > .ldif使用slaptest,除了一些默认模式之外,目标目录中没有任何内容。我没有被创造出来。我添加了slapd.conf的路径。我通过Apache Directory Studio创建.schema文件:
ValidationError: Poll validation failed: pollcode: Path `pollcode` is required.,
userDefinedAnswers: Path `userDefinedAnswers` is required.,
question: Path `question` is required.,
answers: Path `answers` is required.
你有什么想法没有.ldif文件吗?
答案 0 :(得分:2)
我试图将自己的架构添加到OpenLDAP,但是当我转换时 .schema - > .ldif使用slaptest,目的地没有任何东西 目录除了一些默认模式。
slaptest
完全按照您的描述进行操作:将模式转换为ldif。您从未将ldif添加到目录中。 (以任何方式slaptest
可以将ldif添加到目录中,如命令名称所示,它是进行测试,而不是修改目录)
没有创建我的。
LDIF已创建,它只是没有添加到目录
我添加了slapd.conf的路径
多年来,OpenLDAP配置没有slapd.conf
用于。您必须使用cn=config
分支来执行此操作
我通过Apache Directory Studio创建.schema文件
如上所述,旧的OpenLDAP配置系统使用了.schema
个文件。现在你必须使用cn=config
分支
了解更多信息:
cn=config
分支内:cn=schema,cn=config
cn={x}myschema,cn=schema,cn=config
包含ldif,例如:dn: cn={4}myschema,cn=schema,cn=config objectClass: olcSchemaConfig cn: {4}myschema olcAttributeTypes: {0}( 0.0.0.0.0.1.1 NAME 'code' DESC 'Some code identificati on' SUP description ) olcAttributeTypes: {1}( 0.0.0.0.0.1.2 NAME ( 'latitude' 'lat' ) DESC 'Latitude ' SUP description ) olcObjectClasses: {5}( 0.0.0.0.0.2.6 NAME 'groupCustom' DESC 'A group of nam es (DNs) with optionnal member attribute' SUP top STRUCTURAL MUST ( cn ) MAY ( member $ seeAlso $ owner $ description ) ) olcObjectClasses: {6}( 0.0.0.0.0.2.7 NAME 'groupDynamic' DESC 'A DYNAMIC g roup of names (DNs) with optionnal member attribute' SUP top STRUCTURAL MUST ( cn $ dynListURL ) MAY ( member $ seeAlso $ owner $ description ) )
注意:此示例是slapcat
的结果,并且LDIF不会描述要将模式添加到目录中执行的ldapadd
操作。但如果您不想编写LDIF以用于ldapadd
操作
有关详情,请参阅阅读http://www.zytrax.com/books/ldap/ch6/slapd-config.html#use-schemas