首页 文章

如何使用Active Directory用户使用的属性扩展OpenLDAP中的inetOrgPerson对象类

提问于
浏览
1

我有一个与Active Directory一起使用的应用程序,并依赖于用户objectClass上的某些属性 . 我想添加一个用于OpenLDAP的模式,这样我就可以在OpenLDAP中创建一个使用用户帐户,其代码与今天的Active Directory相同 . 我创建了以下扩展inetOrgPerson的模式,但在尝试验证并将其转换为ldif文件时,slaptest响应

第11行attributetype:未找到语法:“1.2.840.113556.1.4.906”

问题行似乎是Active Directory使用的Large Integer语法 . 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 ) )

1 回答

相关问题