【问题标题】:OpenLDAP Custom Attribute: "Undefined attribute type"OpenLDAP 自定义属性:“未定义的属性类型”
【发布时间】:2018-05-07 12:53:59
【问题描述】:

尝试向 OpenLDAP 添加新属性并不断碰壁。 我正在尝试将 ipPhone 属性添加到架构中,因为我不能在默认的电话号码属性中包含 * 号码。

我用于创建新属性并将其添加到 objectClass 的 LDIF 文件如下。

dn: cn=schema,cn=config
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: ( 2.25.128424792425578037463837247958458780603.1
        NAME 'ipPhone'
        DESC 'Extension Number'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
add: olcObjectClasses
olcObjectClasses: ( 2.25.128424792425578037463837247958458780603.3
    NAME 'samplePerson'
    DESC 'samplePerson'
    SUP inetOrgPerson
    STRUCTURAL
    MAY  (ipPhone)
 )

为了应用上述内容,我使用了:

ldapmodify -Y EXTERNAL -H ldapi:/// -f attrib.ldif

我可以在以下位置看到添加的配置: /etc/ldap/slapd.d/cn=config/cn=schema.ldif

但是,在重新启动 slapd 并尝试使用此属性添加新用户后,我返回错误:

ldap.UNDEFINED_TYPE: {'info': u'ipPhone: 属性类型未定义', 'desc': u'未定义属性类型'}

我已经测试和谷歌搜索了几个小时,但无法解决这个问题或弄清楚我错过了什么!

【问题讨论】:

    标签: openldap ldif


    【解决方案1】:

    原来我没有将 objectClass 分配给用户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多