Bug 15562 - ldbsearch returns base64 encoded output on non standard chararacters
Summary: ldbsearch returns base64 encoded output on non standard chararacters
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.19.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2024-01-28 17:48 UTC by keesvanvloten
Modified: 2024-01-28 17:48 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description keesvanvloten 2024-01-28 17:48:44 UTC
Ldbsearch returns base64 encoded output for users with non-standard ascii names, e.g. firstname Daniëlla (mind the umlaut on the e), is show in output of ldbsearch as:

cn:: RGFuacOrbGxhIGRlIFZyaWVzCg==

This happens on multiple attributes: cn, displayName, name, gecos, distinquishedName
An indicator of base64 encoded output is the double colon after the attribute name.
And the name is not encoded in the dn:

dn: CN=Daniëlla de Vries,OU=User Accounts,DC=example,DC=com

Base64 encoding of certain attrs is not documented on the man-page of ldbsearch. "samba-tool user show" does decode names and shows all attrs properly. 

Is it possible get properly decode output with ldbsearch as well? In its current form it is confusing and scripts unaware of optional base64 encoding of attributes will fail if they further process this kind of output.

- Kees.