RHDS - How to decode base-64 encoded values?

Solution Verified - Updated -

Issue

It may happen that a search returns a base-64 encoded value whereas a plain text value is expected.
This typically happens when one adds inadvertently trailing space character(s) to an attribute value.

For instance:

# ldapmodify -D "cn=Directory Manager" -W -x -h <HOST> -p <PORT>
Enter LDAP Password:
dn: uid=user1,ou=People,o=Test
changetype: modify
replace: description
description: My description with trailing spaces       

modifying entry "uid=user1,ou=People,o=Test"

#
# ldapsearch -xLLL -D 'cn=Directory Manager' -W -h <HOST> -p <PORT> -b 'uid=user1,ou=People,o=Test' -sbase 'uid=*' description
Enter LDAP Password:
dn: uid=user1,ou=People,o=Test
description:: TXkgZGVzY3JpcHRpb24gd2l0aCB0cmFpbGluZyBzcGFjZXMgICAgICAgIA==

#

Environment

Red Hat Directory Server 9
Red Hat Directory Server 10
Red Hat Enterprise Linux 6.x
Red Hat Enterprise Linux 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content