2015-04-28 42 views
0

我試圖在Ubuntu 14.04上設置openLDAP LDAP,並且我想將自定義架構添加到動態ldap conf。據我瞭解,我必須在DN:cn = myCustomSchema,cn = schema,cn = config下動態添加一個ldif條目到我的ldap。slapd.d中的架構添加:未知指令<objectClass:>

我想要做的是:

  1. 創建模式文件的
  2. 創建.conf文件
  3. 轉換模式的鏈接到我的模式文件到一個LDIF文件,感謝一個slaptest的或用於slapcat命令和.conf文件
  4. 另外.ldif到LDAP

我無法通過第3點去,S ince既slaptest和slapcat命令返回:行xxx:未知的指令外部後端信息和數據庫定義。 我讀了一千次我的模式文件,但我找不到我的錯誤。對於這樣的錯誤,我也找不到任何有用的東西。

這裏是我的架構文件的一部分:

attributeTypes: (1.2.840.113556.1.8000.2554.48931.2232.50796 
    NAME 'altitudeEntity' 
    EQUALITY caseIgnoreMatch 
    ORDERING caseIgnoreOrderingMatch 
    SUBSTR caseIgnoreSubstringsMatch 
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 
    SINGLE-VALUE USAGE userApplications) 

attributeTypes: (1.2.840.113556.1.8000.17728.40464.13370.25661.2712 
    NAME 'descriptionEntity' 
    EQUALITY caseIgnoreMatch 
    ORDERING caseIgnoreOrderingMatch 
    SUBSTR caseIgnoreSubstringsMatch 
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 
    SINGLE-VALUE 
    USAGE userApplications) 
. 
. other attributes 
. 
ObjectClass: (1.2.840.113556.45669.16975.37105.36062 
    NAME 'principalClass' 
    SUP top STRUCTURAL 
    MUST RDNFragment 
    MAY (altitudeEntity $ descriptionEntity $ ...)) 
. 
. other classes extending principalClass (SUP principalClass) 
. 

另外:如果只保留屬性,命令成功,產生的LDIF文件。該錯誤始終在第一個objectClass上。

感謝您的任何幫助:)

回答

2

今天早上發現錯誤,我想我昨天累了。

正確的語法是objectclass (OID ...沒有「:」。我也改變attributeTypes: (OID...attributetype (OID...和一切工作正常。