[Date Prev][Date Next] [Chronological] [Thread] [Top]

Problem with ldapsearch



Hello,

I have the stable release of openldap-2.1.25
(downloaded from the openldap website) installed on my
laptop (RedHat Linux 9.0 kernel 2.4.20-8) together
with some additional software packages:
- Berkeley DB 4.1.25
- openssl-0.9.6l
- cyrus-sasl-2.1.15

I intend to setup my laptop as an ldap server, and
test whether it is setup properly with the simple
ldapsearch and ldapadd commands. 

First of all, I tried to ignore the SASL and TLS/SSL
functionalities and used the anonymous authentication
or simple authentication. 

However, using anonymous authentication, ldapsearch
returned me No such object while using slapcat, I
could see the content of my database

$ ldapsearch -x -b 'dc=plainjoe,dc=org' \
'(objectclass=*)'
# extended LDIF
#
# LDAPv3
# base <dc=plainjoe,dc=org> with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

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

# numResponses: 1

$slapcat
dn: dc=plainjoe,dc=org
dc: plainjoe
objectClass: dcObject
objectClass: organizationalUnit
ou: PlainJoe Dot Org
structuralObjectClass: organizationalUnit
entryUUID: 5ad22222-ebee-1027-8b2d-be9ac4966175
creatorsName: cn=manager,dc=plainjoe,dc=org
modifiersName: cn=manager,dc=plainjoe,dc=org
createTimestamp: 20040205061452Z
modifyTimestamp: 20040205061452Z
entryCSN: 2004020506:14:52Z#0x0001#0#0000

dn: ou=people,dc=plainjoe,dc=org
ou: people
objectClass: organizationalUnit
structuralObjectClass: organizationalUnit
entryUUID: 5adce89c-ebee-1027-8b2e-be9ac4966175
creatorsName: cn=manager,dc=plainjoe,dc=org
modifiersName: cn=manager,dc=plainjoe,dc=org
createTimestamp: 20040205061452Z
modifyTimestamp: 20040205061452Z
entryCSN: 2004020506:14:52Z#0x0002#0#0000

When I tried to use simple authentication, I
encountered the following error:
$ ldapsearch -x -D "cn=manager,dc=plainjoe,dc=org" -w
\
secret -b 'dc=plainjoe,dc=org' '(objectClass=*)' -v
ldap_initialize( <DEFAULT> )
ldap_bind: Invalid credentials (49)

Can somebody help me how to solve this problem?
I have already consulted some resources on the net but
still can't find the solution.

I included some information about how I installed the
software, as well as the content of my slapd.conf.

Thanks in advance for your help,
Lara

*** How I installed the server ***
1. Configuration
$ LDFLAGS="-L/usr/local/lib -L/usr/local/lib/sasl2"
CPPFLAGS="-I/usr/local/openssl/include/openssl
-I/usr/local/include" LIBS="-lssl -lcrypt -lsasl2"
./configure --enable-debug --disable-ipv6
--with-cyrus-sasl --without-kerberos --with-tls
--enable-crypt --enable-passwd --enable-ldbm
--enable-wrappers --enable-x-compile
--with-yielding_select=manual

Here, I'm not sure that it's correct to enable cross
compiling. The reason I did so was because when i ran
configure without it, it would fail and prompt me the
following messages:
$configure: warning: programs compiled here do not run
here
configure: error: if cross compiling, add
--enable-x-compile

2. After Configuration, I successfully installed the
server:
$make depend
$make
$make test
$su root -c 'make install'

*** slapd.conf, I made it similar to the sample
slapd.conf from Gerald Carter's book: LDAP System
Administration published by O'Reilly *** 

include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include
/usr/local/etc/openldap/schema/inetorgperson.schema

logfile         296
pidfile         /var/run/slapd.pid
argsfile        /var/run/slapd.args

database        bdb

suffix          "dc=plainjoe,dc=org"

rootdn          "cn=Manager,dc=plainjoe,dc=org"
rootpw          secret

directory       /var/ldap/plainjoe.org

mode            0600

index   objectClass        eq
index   cn,sn,mail         eq,sub
index   departmentNumber   eq

cachesize       2000

directory       /var/ldap/plainjoe.org

access to *
  by * read


=====
--------------------------------------------------------------------- 
Believe in miracles, but don't depend upon them 
----------------------------------------------------------------------



__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/