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

make output of ldapsearch readable (disable base64)


Since I have been working on a Chinese language based directory the
ldapsearch tool was difficult for me to use, the result is always not

This is because if an attribute value contain Chinese, it's
automatically displayed using base64. I had to copy & paste the result
to 'base64 -d' to read every result, which kills my efficiency. I had to
switch to a GUI ldapbrower, which kills my efficiency more because I
cannot store most of my frequent queries and call them back as easily
would be done on console with readline support.

Is there a way to use ldapsearch and disable using base64 for non-ascii
characters? I searched into the manual without a clue.

Example of un-readable output:

zhangweiwu@esmeralda:~$ ldapsearch -H ldap://gtz.ods.org -D uid=admin,st=jiangxi,o=LGOP -x -w secret -b st=jiangxi,o=LGOP '(pwdFailureTime=*)' pwdFailureTime pwdAccountLockedTime
# extended LDIF
# LDAPv3
# base <st=jiangxi,o=LGOP> with scope subtree
# filter: (pwdFailureTime=*)
# requesting: pwdFailureTime pwdAccountLockedTime 

# \E5\90\89\E5\AE\89\E5\B8\82, jiangxi, LGOP
dn:: b3U95ZCJ5a6J5biCLHN0PWppYW5neGksbz1MR09Q
pwdFailureTime: 20080513080747Z

# \E4\B9\9D\E6\B1\9F\E5\B8\82, jiangxi, LGOP
dn:: b3U95Lmd5rGf5biCLHN0PWppYW5neGksbz1MR09Q
pwdFailureTime: 20080612200319Z
pwdFailureTime: 20080612200326Z

# \E5\8D\97\E6\98\8C\E5\B8\82, jiangxi, LGOP
dn:: b3U95Y2X5piM5biCLHN0PWppYW5neGksbz1MR09Q
pwdFailureTime: 20080726054305Z
pwdFailureTime: 20080726054306Z

# \E6\96\B0\E4\BD\99\E5\B8\82\E5\88\86\E5\AE\9C\E5\8E\BF, jiangxi, LGOP
dn:: b3U95paw5L2Z5biC5YiG5a6c5Y6/LHN0PWppYW5neGksbz1MR09Q
pwdFailureTime: 20080613022146Z

# search result
search: 2
result: 0 Success

# numResponses: 5
# numEntries: 4