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 2064 게시물 읽기
No. 2064
밑의 ldapadd 에러에 대해 질문드렸던사람입니다.
작성자
이상협
작성일
2004-05-27 17:10
조회수
7,689

죄송합니다. 이전 글에 댓글로 쓰려는건 아니었는데 너무 길어서 보기 불편하게 되어 이렇게 다시 올립니다.

ldapadd는 이제 잘 되는 것 같습니다. 그런데 search에서 문제가 생긴것 같습니다.

고수님들의 고견을 부탁드립니다.

[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

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

죄송합니다.

 

몇번 시도도 안해보고 글을 올렸네요

 

이렇게 하니까 잘 됩니다.

 

[root@shlee openldap]# ldapsearch -x -b "dc=my-domain,dc=com" "objectclass=*"
version: 2

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

# my-domain,dc=com
dn: dc=my-domain,dc=com
dc: my-domain.com
objectClass: dcObject

# test1,dc=my-domain,dc=com
dn: dc=test1,dc=my-domain,dc=com
dc: test2
objectClass: dcObject

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2

 

그런데 신기한던 cn=Manager 빼니까 잘 되는 이유는 무엇일까요?

 

아시는 분의 고견을 기대하겠습니다..

 

이상협님이 2004-05-27 17:17에 작성한 댓글입니다. Edit

ldapsearch 에서 -b 옵션은 검색 base를 지정하는 옵션입니다.

아마 -b "cn=Manager ,dc=my-domain,dc=com" 하셔서 안된다고 하시는것 같은데, cn=Manager ,dc=my-domain,dc=com 는 LDAP 의 manager 값입니다. LDAP 의 DB 에 들어있는 값이 아니며 환경 파일에 들어 있는 값입니다. 따라서 검색 결과는 No such object 입니다

 

명령어에 대한 옵션이나 사용법을 먼저 숙지하신후에 사용하는게 순서 가 아닌가 합니다.

날나리님이 2004-05-28 13:14에 작성한 댓글입니다.
이 댓글은 2004-05-28 13:18에 마지막으로 수정되었습니다. Edit

옙 알겠습니다.

 

죄송합니다. 옵션에 대해 다 숙지하지 못하여 실수를 저질렀군요

 

죄송합니다.

 

좋은 답변 감사합니다. ^^

이상협님이 2004-05-28 18:28에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
2068LDAP에서 숫자검색이 되게하려면 어떻게해야합니까? [3]
이상수
2004-06-02
7233
2066송상준 님의 LDAP책 아직안나왔나요 [2]
이재용
2004-06-01
7893
2065ldap을 설치했습니다. client 프로그램을 만들려고 하는데요. [3]
김광희
2004-05-28
8093
2064밑의 ldapadd 에러에 대해 질문드렸던사람입니다. [3]
이상협
2004-05-27
7689
2063SunONE로그 한글 변환 [1]
송상준
2004-05-27
7389
2061ldapadd에서의 에러 입니다. [3]
이상협
2004-05-26
7770
2060얼마전 메모를 보고... [1]
프롬이
2004-05-25
7394
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.021초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다