[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Deleting a DN with leading Space Character
Spot on... An upgrade isn't an option anyhow....so I had to work thru this somehow.
Regards
Garry
> -----Original Message-----
> From: Pierangelo Masarati [mailto:ando@sys-net.it]
> Sent: Thursday, 4 August 2005 4:06 PM
> To: Garry Thomas
> Cc: openldap-software@OpenLDAP.org
> Subject: Re: Deleting a DN with leading Space Character
>
> Garry Thomas wrote:
>
> >Hi,
> > I have an entry in the directory that has a leading
> space as follows
> >
> >dn: uid= username,dc=domain,dc=com
> >
> >I cannot workout how to use ldapdelete to delete this entry,
> either by specifying the DN on the command line, or in a file.
> >
> >I have a file called userdel.ldif which has the following
> >
> >dn: uid= username,dc=domain,dc=com
> >
> >But when I execute ldapdelete I get
> >
> >Delete Result: Invalid DN syntax (34)
> >Additional info: invalid DN
> >
> >I've tried "escaping" the space with a backslash, and a few
> other ideas (like using quotes all over the place), but I
> can't get rid
> >of it...
> >
> >
>
> Apparently no one asked you the right question: what version of slapd
> are you using? Any recent/decent version of OpenLDAP
> software wouldn't
> let such an entry appear in a database, because the leading
> space would
> have been trimmed from the prettified form of the DN that is actually
> read in; at the same time, no matter how many unquoted
> leading/trailing
> spaces you use in the delete request, they would simply be trimmed
> before proceeding to the database for the actual operation.
> An escaped
> space would appear as such, as "\20" in the database.
> Earlier versions
> of OpenLDAP software were a bit loose on this (I'm talking
> about 2.0 and
> earlier), so I suspect you're using something like that. In
> such case,
> the only chance you can fix that datum is slapcat/manual
> editing/slapadd.
>
> p.
>
>
> SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax:
> +390382476497
>