29 Nov 2010

ldapsearch encoding issues

Ever wondered why your ldapsearch results are base64 encoded for some values? ldapsearch does a base64 encoding while returning values if there is a space in the end or in the front. It also encodes the value when there is a special character in the value. To get the proper decoded value I would recommend using Net::LDAP which decodes the value while returning via Net::LDAP::Entry

1 comment:

  1. Can you help me converting the below password to base64 encoding ?

    root@ldap02 /bkp_ldap # perl -e 'print("userPassword: {CRYPT}".crypt("secret","salt")."\n");'
    userPassword: {CRYPT}saHW9GdxihkGQ