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

Re: AW: AW: adding first entry



sure! 
> Could you send your slapd.conf?

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26
17:06:18 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /opt/local/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         /opt/local/var/slapd.pid
argsfile        /opt/local/var/slapd.args
schemacheck off
# Load dynamic backend modules:
# modulepath    /opt/local/libexec/openldap
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

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

database        ldbm
suffix          "dc=ecrc,dc=de"
rootdn          "cn=admin,dc=ecrc,dc=de"
rootpw          test
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory       /opt/local/var/openldap-ldbm
# Indices to maintain
#index   pres, eq
index   objectClass    pres,eq

access to attr=userPassword
        by self write
        by anonymous auth
        by dn="cn=admin,dc=ecrc,dc=de" write
        by * none




and here the entries.ldif

dn: dc=ecrc,dc=de
objectclass: dcObject
objectclass: organization
o: Cable & Wireless Deutschland GmbH
dc: ecrc

dn: cn=admin,dc=ecrc,dc=de
objectclass: organizationalRole
cn: admin

But here a surprise. I deleted the contend of entries.ldif and put the
same content back into it from a mail. And here what I get:

ldapadd -x -v -D "cn=admin,dc=ecrc,dc=de" -W -f entries.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
add objectclass:
        dcObject
        organization
add o:
        Cable & Wireless Deutschland GmbH
add dc:
        ecrc
adding new entry "dc=ecrc,dc=de"
modify complete

add objectclass:
        organizationalRole
add cn:
        admin
adding new entry "cn=admin,dc=ecrc,dc=de"
modify complete


I sounds to me, like it did what I wanted. I´m only confused by the
phrase modify complete. I added and not modified, right?
I thought I´ve solved the problem, but here it is. The next one.
As you see above he added the first entry into the database, but
I can´t search... why?
Here my search call and the result:


root@alba[148]bin# ldapsearch -x -b 'dc=ecrc,dc=de' '(objectclass=*)'
version: 2

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

# search result
search: 2
result: 0 Success

# numResponses: 1
root@alba[149]bin#


Regards
Thomas