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

Re: cannot delete an entry !?



Pierangelo Masarati wrote:
> 
> Jehan PROCACCIA wrote:
> 
> > I entered a wrong entry, how ? no matter , now I want to remove it  but
> > I cannot  :-(.
> >
> > $ldapsearch -x -b "dc=int-evry,dc=fr" "uid=*toto*"
> > version: 2
> >
> > #
> > # filter: uid=*toto*
> > # requesting: ALL
> > #
> >
> > # toto,People,dc=int-evry,dc=fr,People,dc=int-evry,dc=fr
> > dn: uid=toto,ou=People,dc=int-evry,dc=fr,ou=People,dc=int-evry,dc=fr
> > uid: gilles
> > uid: toto,ou=People,dc=int-evry,dc=fr
> > ...
> >
> > here the entry is found, but the dn is wrong.
> > dn: uid=toto,ou=People,dc=int-evry,dc=fr,ou=People,dc=int-evry,dc=fr
> >
> > should be
> >
> > dn: uid=toto,ou=People,dc=int-evry,dc=fr
> >
> > I just want to remove it , how ?
> >
> > $cat /tmp/dn
> > dn: uid=toto\,ou=People\,dc=int-evry\,dc=fr,ou=People,dc=int-evry,dc=fr
> > changetype: delete
> >
> > $ldapmodify -x -W -D"cn=admin,dc=int-evry,dc=fr" -f /tmp/dn
> > Enter LDAP Password:
> > deleting entry
> > "uid=toto,ou=People,dc=int-evry,dc=fr,ou=People,dc=int-evry,dc=fr"
> > ldap_delete: Unknown error
> >         additional info: could not locate parent of entry
> >
> > ldif_record() = 80
> 
> Looks like you played a little with modrdn, right?

yes !

> Next release of OpenLDAP will not allow this any
> more. Back to your problem, there's no way to delete
> that entry by means of a normal delete operation.
> All you should do, in my opinion, is dump the database
> and start from scratch with slapadd, after cleaning
> by hand the ldif file.

Ok, if there's nothing better to do, hopefully this is a test directory,
that won't hurt to much. it will be good in latter versions not to be
able to do this, I did though enable shemacheck whill runnig modrdn ...

Thanks
> 
> Pierangelo.
> 
> --
> Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
> Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
> Politecnico di Milano                 | mailto:masarati@aero.polimi.it
> via La Masa 34, 20156 Milano, Italy   | http://www.aero.polimi.it/~masarati

-- 
Jehan Procaccia
Institut National des Telecommunications| Email:
Jehan.Procaccia@int-evry.fr 
MCI, Moyens Communs Informatiques	| Tel  : +33 (0) 160764436 
9 rue Charles Fourier 91011 Evry France | Fax  : +33 (0) 160764321