openldap-无法从架构文件创建ldif文件
我试图将自己的模式添加到OpenLDAP,但是当我使用slaptest转换.schema->.ldif时,除了一些默认模式之外,目标目录中没有任何内容。我的不是被创造出来的。我将路径添加到slapd.conf。我正在通过Apache Directory Studio创建.schema文件:openldap-无法从架构文件创建ldif文件,ldap,schema,openldap,ldif,Ldap,Schema,Openldap,Ldif,我试图将自己的模式添加到OpenLDAP,但是当我使用slaptest转换.schema->.ldif时,除了一些默认模式之外,目标目录中没有任何内容。我的不是被创造出来的。我将路径添加到slapd.conf。我正在通过Apache Directory Studio创建.schema文件: attributetype ( 2.0.0.0.1 NAME 'objectName' DESC '' EQUALITY caseIgnoreMatch SUBSTR cas
attributetype ( 2.0.0.0.1
NAME 'objectName'
DESC ''
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 2.0.0.0.2
NAME 'editableObject'
DESC ''
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
USAGE userApplications )
attributetype ( 2.0.0.0.3
NAME 'mailDesc'
DESC ''
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
USAGE userApplications )
attributetype ( 2.0.0.0.4
NAME 'visibleObject'
DESC ''
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
USAGE userApplications )
attributetype ( 2.0.0.0.5
NAME 'objectDesc'
DESC ''
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
USAGE userApplications )
objectclass ( 2.0.0.1.1
NAME 'myObject'
DESC ''
SUP top
AUXILIARY
MAY ( objectName $ objectDesc ) )
objectclass ( 2.0.0.1.2
NAME 'myRole'
DESC ''
AUXILIARY
MAY ( editableObject $ visibleObject ) )
objectclass ( 2.0.0.1.3
NAME 'myUser'
DESC ''
AUXILIARY
MAY ( editableObject $ visibleObject $ mailDesc ) )
你知道为什么没有.ldif文件吗
我试图将我自己的模式添加到OpenLDAP,但是当我转换
.schema->.ldif使用slaptest,目标中没有任何内容
目录,但某些默认模式除外
slaptest
完全按照您描述的那样:将模式转换为ldif。您从未将ldif添加到目录中。(以任何方式slaptest
都可以将ldif添加到目录中,正如命令名所暗示的,它是进行测试,而不是修改目录)
我的不是被创造出来的
LDIF已经创建,只是没有添加到目录中
我将路径添加到slapd.conf
多年来,没有slapd.conf
用于OpenLDAP配置。您必须使用cn=config
分支来执行此操作
我正在通过Apache Directory Studio创建.schema文件
如上所述,.schema
文件由旧的OpenLDAP配置系统使用。现在您必须使用cn=config
分支
有关更多信息:
- 架构存储在
分支中:cn=config
cn=schema,cn=config
- 要添加架构,必须添加如下条目:
包含ldif,例如:cn={x}myschema,cn=schema,cn=config
slapcat
的结果,而LDIF绝不描述要执行的ldapadd
操作,以将架构添加到目录中。但是,如果您不想编写LDIF以与ldapadd
操作一起使用,您仍然可以使用apachedirectory Studio导入它
有关更多信息,请考虑阅读
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 ) )