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

Re: (ITS#3104)

Pierangelo Masarati wrote:

>Are you sure the DB exists?  i.e. can you add a legal entry?
Yes of course.

>Are you using the same DB as with 2.2.6 or did you regenerate it?
No. I create new database.

My steps:

1. create config file:
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/nis.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/misc.schema
pidfile         /var/run/openldap/slapd.pid
argsfile        /var/run/openldap/slapd.args
database        bdb
suffix          "dc=komi,dc=mts,dc=ru"
rootdn          "cn=ldapmanager,dc=komi,dc=mts,dc=ru"
rootpw          secret
directory       /var/db/openldap-data
index   objectClass     eq
loglevel -1

2. clear old database:
# rm -rf /var/db/openldap-data/*
rm: No match.

3. start slapd:
# /etc/rc.d/slapd start
Starting slapd.

4. create initial legal entries from 0.ldif:
dn: dc=komi,dc=mts,dc=ru
objectClass: top
objectClass: domain
dc: komi

dn: cn=ldapmanager,dc=komi,dc=mts,dc=ru
objectClass: top
objectclass: organizationalRole
cn: ldapmanager

# ldapadd 0.ldif
Enter LDAP Password:
adding new entry "dc=komi,dc=mts,dc=ru"
adding new entry "cn=ldapmanager,dc=komi,dc=mts,dc=ru"

# ldapsearch -x -b 'dc=komi,dc=mts,dc=ru' -LLL '(cn=ldapmanager)'
dn: cn=ldapmanager,dc=komi,dc=mts,dc=ru
objectClass: top
objectClass: organizationalRole
cn: ldapmanager

it seems ok.

5. add wrong entry 1.ldif:
dn: cn=test,dc=komi,dc=mts,dc=ru
cn: test
objectClass: organizationalRole
objectClass: abcd
x: y
uid: test
loginShell: /bin/csh
uidNumber: 3000
gidNumber: 2513
homeDirectory: /home/test

# ldapadd 1.ldif
Enter LDAP Password:
adding new entry "cn=test,dc=komi,dc=mts,dc=ru"
Apr 21 16:13:42 kernel: pid 77920 (slapd), uid 389: exited on signal 6

Apr 21 16:13:42 slapd[77920]: do_add: dn (cn=test,dc=komi,dc=mts,dc=ru)
Apr 21 16:13:42 fec slapd[77920]: conn=3 op=1 ADD dn="cn=test,dc=komi,dc=mts,dc=ru"
Apr 21 16:13:42 slapd[77920]: bdb_dn2entry("cn=test,dc=komi,dc=mts,dc=ru")
Apr 21 16:13:42 slapd[77920]: => bdb_dn2id( "cn=test,dc=komi,dc=mts,dc=ru" )
Apr 21 16:13:42 slapd[77920]: <= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30990)
Apr 21 16:13:42 slapd[77920]: bdb_referrals: op=104 target="cn=test,dc=komi,dc=mts,dc=ru" matched="dc=komi,dc=mts,dc=ru"

Thanks a lot!