database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
ㆍLDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
LDAP Q&A 2061 게시물 읽기
No. 2061
ldapadd에서의 에러 입니다.
작성자
이상협
작성일
2004-05-26 11:36
조회수
7,961

[root@shlee openldap]# ldapadd -x -D "cn=Manager,dc=my-domain,dc=com" -w secret << EOF
> dn:dc=my-domain,dc=com
> cn:root
> sn:root
> telephoneNumber:017-111-1111
> objectclass:person
> EOF
adding new entry "dc=my-domain,dc=com"
ldap_add: Naming violation
additional info: naming attribute 'dc' is not present in entry

ldif_record() = 64
[root@shlee openldap]# ldapsearch -x -b "cn=Manager,dc=my-domian,dc=com" objectclass=*
version: 2

#
# filter: objectclass=*
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1

[root@shlee openldap]# ldapadd -x -D "cn=Manager,dc=my-domain,dc=com" -W << EOF
> dn:dc=my-domain,dc=com
> dc:my-domain.com
> objectclass:domain
> EOF
Enter LDAP Password:
adding new entry "dc=my-domain,dc=com"
ldap_add: Object class violation
additional info: unrecognized objectClass 'domain'

ldif_record() = 65
[root@shlee openldap]# ldapadd -x -D "cn=Manager, dc=my-domain, dc=com" -W << EOF
> dn: dc=my-domain, dc=com
> dc: my-domain.com
> objectclass:dcObject
> EOF
\Enter LDAP Password:
adding new entry "dc=my-domain, dc=com"
ldap_add: Object class violation
additional info: no structural object class provided

ldif_record() = 65

이러한 에러가 발생합니다. 이렇게 해보고 저렇게 해봐도 이 에러에 대해 잘 모르겠습니다.

도와주십시오 원인도 모르겠고, 해결책은 더더욱 모르겠습니다.

고수님들의 조언을 바라겠습니다. ㅜ.ㅜ 좀 급해요 도와수제쇼

인스톨 버전은 berkelyDB db-4.2.52.NC 과 openldap-2.1.30 입니다. OS는 redhat 7.2입니다.

밑에는 slapd.conf 파일내용입니다.

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.8 2003/05/24 23:19:14 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/openldap/etc/openldap/schema/core.schema
# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org

pidfile /usr/local/openldap/var/slapd.pid
argsfile /usr/local/openldap/var/slapd.args

# Load dynamic backend modules:
# modulepath /usr/local/openldap/libexec/openldap
# moduleload back_bdb.la
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la

# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64

# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
access to * by * read
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy is:
# Allow read by all
#
# rootdn can always write!

#######################################################################
# ldbm database definitions
#######################################################################

database bdb
suffix "dc=my-domain,dc=com"
rootdn "cn=Manager,dc=my-domain,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /usr/local/openldap/var/openldap-data
# Indices to maintain
index objectClass eq

이 글에 대한 댓글이 총 3건 있습니다.

objectclass:person
에는 dc라는 att 가 존재 하지 않습니다.

.....님이 2004-05-27 12:41에 작성한 댓글입니다. Edit

> dn:dc=my-domain,dc=com
> cn:root
> sn:root
> telephoneNumber:017-111-1111
> objectclass:person

네 윗분이야기 받는거 같습니다.

objectclass에 dc를 포함하는 Objectclass를 나열해 주시는것이

objectclass:dcobject를 넣어 주심이...

송상준(sjsong)님이 2004-05-27 16:10에 작성한 댓글입니다.

답변 감사드립니다.

 

그런데 버전을 낮추어 버클리 db 3.1.17과 openldap 2.0.27에서는

잘 되더군요

 

[root@shlee openldap]# ldapadd -x -D "cn=Manager,dc=my-domain,dc=com" -w secret << EOF
> dn:dc=test1,dc=my-domain,dc=com
> dc:test2
> objectclass:dcObject
> EOF
adding new entry "dc=test1,dc=my-domain,dc=com"

[root@shlee openldap]# ldapsearch
ldap_sasl_interactive_bind_s: No such attribute
[root@shlee openldap]# ldapsearch -x 
version: 2

#
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1

 

위와 같이 입력은 잘 되었습니다만 ldapsearch에서는 이러한 결과가 나타납니다.

 

이유가 무엇인지 잘 모르겠습니다.

 

 

 

<slapd.conf> 파일 입니다.

 

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /etc/openldap/schema/core.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org

pidfile         /usr/local/openldap/var/slapd.pid
argsfile        /usr/local/openldap/var/slapd.args

# Load dynamic backend modules:
# modulepath    /usr/local/openldap/libexec/openldap
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

#
# Sample Access Control
#       Allow read access of root DSE
#       Allow self write access
#       Allow authenticated users read access
#       Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
#       by self write
#       by users read
#       by anonymous auth
#
# if no access controls are present, the default is:
#       Allow read by all
#
# rootdn can always write!

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix          "dc=my-domain,dc=com"
#suffix         "o=My Organization Name,c=US"
rootdn          "cn=Manager,dc=my-domain,dc=com"
#rootdn         "cn=Manager,o=My Organization Name,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          secret
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory       /usr/local/openldap/var/openldap-ldbm
# Indices to maintain
index   objectClass     eq

 

 

이상협님이 2004-05-27 17:01에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
2065ldap을 설치했습니다. client 프로그램을 만들려고 하는데요. [3]
김광희
2004-05-28
8336
2064밑의 ldapadd 에러에 대해 질문드렸던사람입니다. [3]
이상협
2004-05-27
7883
2063SunONE로그 한글 변환 [1]
송상준
2004-05-27
7573
2061ldapadd에서의 에러 입니다. [3]
이상협
2004-05-26
7961
2060얼마전 메모를 보고... [1]
프롬이
2004-05-25
7578
2059openLDAP backendDB에서 scope가 subtre일때 [1]
자유
2004-05-18
7258
2058C API에서 컴파일 오류 [3]
윤성중
2004-05-12
7598
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.4로 자료를 관리합니다