[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Help me delete an incorrectly modified entry
Well, this is not a whole lot better than "restore from backups", but
you could shut down your ldap server, ldbmcat the id2entry.dbb file,
manually edit the DN of the entry in question, then reload.
Regards,
Randy
> I am using OpenLDAP 1.2.9 on RedHat 6.2 from the RedHat rpm openldap-1.2.9-6.
>
> I was doing an ldapmodify by hand to modify a dn, I did not specify the
> newrdn correctly, and now I am stuck.
>
> The old dn was "cn=David L. Crow, ou=People, dc=waveset, dc=com" and I
> want the new dn to be "cn=David Crow, ou=People, dc=waveset, dc=com", so
> I did the following:
>
> $ ldapmodify -D cn=root,dc=waveset,dc=com -W << EOF
> > dn: cn=David L. Crow, ou=People, dc=waveset, dc=com
> > changetype: modrdn
> > newrdn: cn=David Crow, ou=People, dc=waveset, dc=com
> > deleteoldrdn: 1
> > EOF
> Enter LDAP Password:
> modifying rdn of entry cn=David L. Crow, ou=People, dc=waveset, dc=com
> modrdn completed
>
> Unfortunately, I now know that the newrdn should have been just
> "cn=David Crow". My LDAP object now looks like (without phone numbers
> and other somewhat sensitive information):
>
> cn=David Crow, ou=People, dc=waveset, dc=com, ou=People, dc=waveset, dc=com
> ou=People
> givenname=David
> objectclass=top
> objectclass=person
> objectclass=organizationalPerson
> objectclass=inetorgperson
> sn=Crow
> cn=David Crow
>
> I could not do an ldapdelete or ldapmodify to correct this problem:
>
> $ ldapmodify -D cn=root,dc=waveset,dc=com -W << EOF
> > dn: cn=David Crow, ou=People, dc=waveset, dc=com, ou=People, dc=waveset, dc=com
> > changetype: modrdn
> > newrdn: cn=David Crow
> > deleteoldrdn: 1
> > EOF
> Enter LDAP Password:
> modifying rdn of entry cn=David Crow, ou=People, dc=waveset, dc=com, ou=People, dc=waveset, dc=com
> ldap_modrdn: Operations error
>
> $ ldapdelete -D cn=root,dc=waveset,dc=com -W << EOF
> > dn: cn=David Crow, ou=People, dc=waveset, dc=com, ou=People, dc=waveset, dc=com
> > EOF
> Enter LDAP Password:
> ldap_delete: No such object
> ldap_delete: matched: OU=PEOPLE,DC=WAVESET,DC=COM
>
> So I figured the problem was that there were no objects for the additional
> "ou=People, dc=waveset, dc=com", so I added them and now I get the error:
>
> $ ldapdelete -D cn=root,dc=waveset,dc=com -W << EOF
> > dn: cn=David Crow, ou=People, dc=waveset, dc=com, ou=People, dc=waveset, dc=com
> > EOF
> Enter LDAP Password:
> ldap_delete: No such object
> ldap_delete: matched: OU=PEOPLE,DC=WAVESET,DC=COM,OU=PEOPLE,DC=WAVESET,DC=COM
>
> This seems better, but I still cannot delete or re-modify the record.
> Does anyone have any hints or tips as to how to recover from this?
> Hopefully something other than "restore from backup". We have plenty of
> backups, but I would hate to lose a days modifications to the directory
> data.
>
>
> --
> David L. Crow Texas! It's like a
> crow@OrangeBlood.org whole other country.
>
>