歡迎您光臨本站 註冊首頁

py版主,又來麻煩您啦! schema 的問題。(問題已解決,謝謝py!)

# /usr/local/libexec/slapd
提示:/usr/local/etc/openldap/schema/yellow-page.schema: line 24: AttributeType inappropriate matching rule: "caseIgnoreMatch"   (屬性語法規則不匹配,這是什麼原因呀?語法規則從哪裏可以看到的?attributetype 的數字我修改過後還是一樣的提示。)


這是/usr/local/etc/openldap/schema/yellow-page.schema 的內容,


attributetype (1.3.6.1.4.1.92158.2.1.1
        NAME 'Visible'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )

attributetype (1.3.6.1.4.1.92158.2.1.2
        NAME 'HasProfile'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )

attributetype (  1.3.6.1.4.1.92158.2.1.3
        NAME 'JobDuty'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )


attributetype ( 1.3.6.1.4.1.92158.2.1.4
      NAME ( 'DateJoin' )
      DESC 'Date Join (format YYYYMMDD, only numeric chars)'
      EQUALITY numericStringMatch
      SINGLE-VALUE
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{8} )

attributetype ( 1.3.6.1.4.1.92158.2.1.5
      NAME ( 'DateOfBirth' )
      DESC 'Date of Birth (format YYYYMMDD, only numeric chars)'
      EQUALITY numericStringMatch
      SINGLE-VALUE
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{8} )


attributetype (  1.3.6.1.4.1.92158.2.1.6
        NAME 'Hobby'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (  1.3.6.1.4.1.92158.2.1.7
        NAME 'Intranet'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )

attributetype (  1.3.6.1.4.1.92158.2.8
        NAME 'Department'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (  1.3.6.1.4.1.92158.2.1.9
        NAME 'FBURL'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

objectClass ( 1.3.6.1.4.1.92158.2.1
        NAME 'Information'
        DESC 'Information of Colleague'
        MUST ( uid )
        MAY ( Visible $ HasProfile $ JobDuty $ DateJoin $ DateOfBirth $ Hobby $ Intranet $ Department $ FBURL ))

[ 本帖最後由 lg8080 於 2006-11-28 14:21 編輯 ]
《解決方案》

caseIgnoreMatch的SYNTAX是1.3.6.1.4.1.1466.115.121.1.15
《解決方案》

py,這個caseIgnoreMatch的SYNTAX 是的哪裡看的?

用什麼方法可以看到?

在這一行又出現這個錯誤提示了:

attributetype (  1.3.6.1.4.1.92158.2.1.7
        NAME 'Intranet'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )

Intranet 的 SYNTAX 是什麼呢?

[ 本帖最後由 lg8080 於 2006-11-24 22:41 編輯 ]
《解決方案》

謝謝py,我用phpldapadmin里的語法與規則可以看到這個 SYNTAX 了。
現在啟用slapd時可以通過了。
《解決方案》

py,我新建的ObjectClass是:SZInformation 但是當我用phpldapadmin準備把這個ObjectClass加入到裡面時,卻發現沒有找到這個ObjectClass ?

用 ldif 文件匯入時有這個提示:

# ldapadd -x -D "cn=Manager,dc=mygroup,dc=com" -W -f vv.ldif
Enter LDAP Password:

adding new entry "cn=shenzhen ( china ),dc=mygroup,dc=com"
ldap_add: Invalid syntax (21)
               additional info: objectClass: value #1 invalid per syntax

[ 本帖最後由 lg8080 於 2006-11-25 00:40 編輯 ]
《解決方案》

原帖由 lg8080 於 2006-11-24 22:24 發表
py,這個caseIgnoreMatch的SYNTAX 是的哪裡看的?

用什麼方法可以看到?

在這一行又出現這個錯誤提示了:

attributetype (  1.3.6.1.4.1.92158.2.1.7
        NAME 'Intranet'
        DESC 'Boolean ...
最好是看schema文件, 用phpldapadmin一個個看比較麻煩, 但一些內部的屬性就都可以看到了
《解決方案》

原帖由 lg8080 於 2006-11-25 00:23 發表
py,我新建的ObjectClass是:SZInformation 但是當我用phpldapadmin準備把這個ObjectClass加入到裡面時,卻發現沒有找到這個ObjectClass ?

用 ldif 文件匯入時有這個提示:

# ldapadd -x - ...
新建立的ObjectClass要寫在schema文件中並在slapd.conf文件中include進來重起slapd進程后才會生效.如果有問題,就貼出自己定義的schema文件和執行時出錯的ldif文件內容
《解決方案》

py,這是文件 szdepartment.schema 的內容:

ObjectClass 是:szDepartment

attributetype (1.3.6.1.4.1.9215.2.1
        NAME 'Visible'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributetype (1.3.6.1.4.1.9215.2.2
        NAME 'HasProfile'
        DESC 'Boolean'
        SINGLE-VALUE
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributetype (  1.3.6.1.4.1.9215.2.3
        NAME 'JobDuty'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )


attributetype ( 1.3.6.1.4.1.9215.2.4
      NAME ( 'DateJoin' )
      DESC 'Date Join (format YYYYMMDD, only numeric chars)'
      EQUALITY numericStringMatch
      SINGLE-VALUE
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{8} )

attributetype ( 1.3.6.1.4.1.9215.2.5
      NAME ( 'DateOfBirth' )
      DESC 'Date of Birth (format YYYYMMDD, only numeric chars)'
      EQUALITY numericStringMatch
      SINGLE-VALUE
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{8} )

attributetype (  1.3.6.1.4.1.9215.2.6
        NAME 'Hobby'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (  1.3.6.1.4.1.9215.2.7
        NAME 'FBURL'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (  1.3.6.1.4.1.9215.2.8
        NAME 'Department'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

objectclass ( 1.3.6.1.4.1.9215.2 NAME 'szDepartment'
        DESC 'Department objects for mygroup sz' SUP top AUXILIARY
        MUST ( ou )
        MAY ( Department ) )

[ 本帖最後由 lg8080 於 2006-11-28 10:10 編輯 ]
《解決方案》

ldif文件
《解決方案》

早呀py,這是那個 ldif 文件。在匯入的時候系統提示:

# ldapadd -x -D "cn=Manager,dc=mygroup,dc=com" -W -f /root/cc.ldif
Enter LDAP Password:
adding new entry "cn=workpass ( china-sz ),dc=mygroup,dc=com"
ldap_add: Object class violation (65)
        additional info: attribute 'Visible' not allowed




dn: cn=workpass ( china-sz ),dc=objectClass: squidAccount,dc=com
cn: workpass ( china-sz )
sn: workpass
givenName: workpass
objectClass: person
objectClass: szDepartment
objectClass: inetOrgPerson
objectClass: postfixAccount
objectClass: squidAccount
title: N/A
Visible: Ture
mail: workpass@mygroup.com
uid: workpass
mailacceptinggeneralid: workpass@sz-mail02.mygroup.com
telephoneNumber: (086)755-
physicalDeliveryOfficeName: 6/F
o: mygroup Enterprises Limited
c: China
ou: IT
userPassword:: Ym9zc2luaQ==
maildrop: workpass@sz-mail02.mygroup.com

[火星人 ] py版主,又來麻煩您啦! schema 的問題。(問題已解決,謝謝py!)已經有724次圍觀

http://coctec.com/docs/service/show-post-43757.html