Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

LDAP : The mystery of base 64 encoded entries

neutrino38 (1037806) writes | more than 6 years ago

User Journal 0

I happend to manage an LDAP directory. It contains users with French names. Those names contains accents (you know é è à and so on ...). LDAP has a nice support of this. It encode such entries in UTF-8 and reencode the result in base64 to be compliant with the original LDAP format.

By default, Fedora Directory Server use cn= as the first part of DN. As a result, when a user happend to have an accent in his/her name, it produced a base 64 encoded DN !!!

I happend to manage an LDAP directory. It contains users with French names. Those names contains accents (you know é è à and so on ...). LDAP has a nice support of this. It encode such entries in UTF-8 and reencode the result in base64 to be compliant with the original LDAP format.

By default, Fedora Directory Server use cn= as the first part of DN. As a result, when a user happend to have an accent in his/her name, it produced a base 64 encoded DN !!!

Example:

dn:: Y249SE/LTCBNaWNoZWwsb3U9cGVvcGxlLG91PXdlYnNvdXJkLG91PWFib25uZXMsZGM9aXZlcyxkYz1mcg==

Yeah. Now, how to we delete, manage such entries ? I spent a lot of time and found the solution:

1- make sure your terminal emuator is configured to handle UTF-8 as char encoding.
2- express the DN directly in UTF-8 to manipulate the entry and NOT in its base64 encoding.

For instance to delete the entry which has the above DN, do not exeute

ldapdelete ': Y249SE/LTCBNaWNoZWwsb3U9cGVvcGxlLG91PXdlYnNvdXJkLG91PWFib25uZXMsZGM9aXZlcyxkYz1mcg=='

but

ldapdelete 'cn=HOËL Michel,ou=people,ou=group,dc=example,dc=com'

I spend so much time on it...

cancel ×

0 comments

Sorry! There are no comments related to the filter you selected.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>