LDIF 파일을 구문 분석할 수 없는 문제(잘못된 형식(라인 5) 항목: "cn=schema")

LDIF 파일을 구문 분석할 수 없는 문제(잘못된 형식(라인 5) 항목: "cn=schema")

다음 명령을 사용하여 스키마에 새 속성을 추가하려고 합니다.

ldapmodify -f ./add-id-attribute.ldif -h localhost -p 50389 -D "cn=Directory Manager" -w mySecretPassword

그리고 이 LDIF 파일은

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.32474 NAME 'myAttribute'
    USAGE userApplications )
    DESC 'The attribute'

그러나 그것은 나에게 다음과 같은 응답을 줍니다:ldapmodify: invalid format (line 5) entry: "cn=schema"

이미 줄 끝을 UNIX로 변경했지만 도움이 되지 않았습니다. 디렉터리 서버로 OpenAM 6.5.2사용하는 도커 이미지를 사용하고 있습니다 .OpenDJ

답변1

LDiF의 형식이 올바르지 않습니다.

이 줄은 USAGE 줄의 DESC닫는 괄호 뒤에 나오므로 구문 분석할 수 없습니다.)

)attributeTypes 정의가 다음으로 완전히 포함되도록 이동해야 합니다.( )

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.32474 NAME 'myAttribute'
    USAGE userApplications 
    DESC 'The attribute' )

관련 정보