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

Problem with my ldap server and users



Hello

I've got a wierd problem with my ldap server which reoccurs every few
months.
In past I could fix it with completely deleting the ldap database, but
somehow this doesn't satisfy me (lot of work to set it up again).

I run every night a little script which deletes all users based on a
list, this usually works fine. Afterwards it imports all users again
with their maybe changed attributes.

This looks like:
ldapdelete  -x -D "cn=admin,ou=admin,dc=domain,dc=ch" -w password -h
localhost -c -f 
/opt/active-directory-to-ldap/ldap-dn-delete-list.ldif 

ldapadd -f /opt/active-directory-to-ldap/ldap-import.ldif -h localhost
-D "cn=admin,
ou=admin,dc=domain,dc=ch" -w password -a -c -x

The content of the ldap-dn-delete-list.ldif file:
CN=user1,DC=domain,DC=ch
CN=user2,DC=domain,DC=ch
CN=user3,DC=doamin,DC=ch
....

The content of the ldap-import.ldif file:

dn: CN=user1,DC=domain,DC=ch
objectClass: ...
objectClass: ...
cn: user1
sn: Surname
givenName: Givenname
mail: user1@domain.ch

(objectclass info removed)

Now since yesterday is this producing me the following errors.
While deleting:
Delete Result: No such object (32)
Matched DN: dc=domain,dc=ch
Delete Result: No such object (32)
Matched DN: dc=domain,dc=ch
Delete Result: No such object (32)
Matched DN: dc=domain,dc=ch

Afterwards adding:

adding new entry "CN=user1,DC=domain,DC=ch"
ldap_add: Already exists (68)

adding new entry "CN=user2,DC=domain,DC=ch"
ldap_add: Already exists (68)

adding new entry "CN=user3,DC=domain,DC=ch"
ldap_add: Already exists (68)

If I check the database in Jxplorer then I can see that it's empty
besides the admin OU.

I also tried ldapmodify, this produces:
modifying entry "CN=user1,DC=domain,DC=ch"
ldap_modify: No such object (32)
        matched DN: dc=domain,dc=ch
...


Any ideas what this could be?

This is a default debian installation which ldapd version:
slapd -V    
@(#) $OpenLDAP: slapd 2.2.23 (May 30 2005 08:52:42) $
 
@pulsar:/home/torsten/packages/openldap/openldap2.2-2.2.23/debian/build/
servers/slapd

Thanks,
Patrick