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

RE: Deleting a DN with leading Space Character



Hi Øyvind,
	Thanks for you help...but no luck. I've create a file with the contents...

dn:: ZG46IHVpZD0gdGlsaTAxLGRjPW5ldHN0YXJuZXR3b3JrcyxkYz1jb20=

And used the ldapdelete command with the -f option set to use this file, and I get...

Delete Result: Invalid DN syntax (34)
Additional info: invalid DN

I've also tried ldapdelete with the dn on the command line, with the same result...

ldapdelete -x -d .... -w ....  "dn:: ZG46IHVpZD0gdGlsaTAxLGRjPW5ldHN0YXJuZXR3b3JrcyxkYz1jb20="
Delete Result: Invalid DN syntax (34)
Additional info: invalid DN

Any thoughts?

Thanks
Garry

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org 
> [mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of 
> Oyvind Gronnesby
> Sent: Thursday, 4 August 2005 1:09 AM
> To: Garry Thomas
> Cc: openldap-software@OpenLDAP.org
> Subject: Re: Deleting a DN with leading Space Character
> 
> * Garry Thomas
> |
> | 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...
> 
> You need to Base64 encode the value.  The following perl snippet will
> give you what you're looking for:
> 
>   : iago ~$ perl -MMIME::Base64 -e 'print encode_base64("uid= 
> username,dc=foo,dc=bar")'
>   dWlkPSB1c2VybmFtZSxkYz1mb28sZGM9YmFy
> 
> And this should give you the following DN:
> 
>   dn:: dWlkPSB1c2VybmFtZSxkYz1mb28sZGM9YmFy
> 
> -- 
> Øyvind Grønnesby
>