我有一个与Active Directory配合使用的应用程序,并且依赖于用户objectClass的某些属性。我想添加一个与OpenLDAP一起使用的架构,以便可以在OpenLDAP中创建使用用户帐户,其使用的代码与当今与Active Directory一起使用的相同。我创建了以下扩展inetOrgPerson的架构,但是在尝试验证并将其转换为ldif文件时,slaptest会使用
进行响应第11行属性类型:找不到语法:“ 1.2.840.113556.1.4.906”
问题行似乎是Active Directory使用的大整数语法。 OpenLDAP仅包含Integer语法(1.3.6.1.4.1.1466.115.121.1.27),因此如何为Large Integer定义新语法?
attributetype ( 1.2.840.113556.1.4.750 NAME 'groupType'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' SINGLE-VALUE )
attributetype ( 1.3.114.7.4.2.0.33 NAME 'memberOf'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.26' )
attributetype ( 1.2.840.113556.1.4.656 NAME 'userPrincipalName'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
attributetype ( 1.2.840.113556.1.4.52 NAME 'lastLogon'
SYNTAX '1.2.840.113556.1.4.906' )
attributetype ( 1.2.840.113556.1.4.159 NAME 'accountExpires'
SYNTAX '1.2.840.113556.1.4.906' )
attributetype ( 1.2.840.113556.1.4.96 NAME 'pwdLastSet'
SYNTAX '1.2.840.113556.1.4.906' )
attributetype ( 1.2.840.113556.1.4.221 NAME 'sAMAccountName'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
attributetype ( 1.2.840.113556.1.4.8 NAME 'userAccountControl'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' )
attributetype ( 1.2.840.113556.1.4.90 NAME 'unicodePwd'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.40' )
objectclass ( 1.2.840.113556.1.5.9 NAME 'user'
DESC 'a user'
SUP inetOrgPerson STRUCTURAL
MUST ( cn )
MAY ( userPassword $ memberOf $ userPrincipalName $ distinguishedName $ lastLogon $ accountExpires $ pwdLastSet $ sAMAccountName $ userAccountControl $ unicodePwd ) )
objectclass ( 1.2.840.113556.1.5.8 NAME 'group'
DESC 'a group of users'
SUP top STRUCTURAL
MUST ( groupType $ cn )
MAY ( member ) )
请参阅此,支持LDAP语法
http://www.zytrax.com/books/ldap/apa/types.html#syntaxes
尝试:1.3.6.1.4.1.1466.115.121.1.38
1.2.840.113556.1.4.906是Large Integer syntax (also Integer8 and several other names) used by Active Directory,并且在大多数其他LDAP Server实现中没有等效的语法。
您在LDIF中显示的属性(lastLogon,pwdLastSet和accountExpires)实际上是与添加值时在大多数其他LDAP服务器实现中使用的Integer语法不兼容的日期。
大多数LDAP服务器实现所使用的GeneralizedTime(1.3.6.1.4.1.1466.115.121.1.24)与大整数语法中使用的值不同。
但是,您所处的情况将很难解决,就好像应用程序正在使用“大整数语法”专门查询架构或向属性添加值。
我们有一些关于Large Integer Dates的文档
我建议您询问应用程序供应商是否可以支持其他LDAP实现。