Ldapsearch returning base64 encoded results


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Ldapsearch returning base64 encoded results
# 1  
Old 05-22-2017
Ldapsearch returning base64 encoded results

So my ldapsearch works great, except for some results I found today. My search is:

Code:
/usr/lib64/mozldap/ldapsearch -T -h 10.1.1.1 -p 3891 -D "uid=datapower,ou=People,dc=blah,dc=com" -w xxxxxx -b "ou=Certs,dc=blah,dc=com" "(&(x509ValidityNotAfter<=20170623132953Z)(x509ValidityNotAfter>=20170522132953Z))" FSID X509SerialNumber x509ValidityNotAfter X509Issuer

Almost everything returns just fine:

Code:
dn: x509oid=1430833298883,ou=Certs,dc=com
X509SerialNumber: 65794219962985063522072255299762693016
FSID: F00PCF
X509Issuer: CN=GeoTrust SSL CA - G3, O=GeoTrust Inc., C=US
x509ValidityNotAfter: 20170620235959Z

But some results have many multiple matching attributes (FSID). Nearly all return good results, but for this one it returns a bunch of values that are base 64 encoded (see below Rj*....). Any idea why it would just chose to do so on this one (I've went directly to ldap and those attribute values are not in base64):


Code:
dn: x509oid=1443642301854,ou=Certs,dc=routeone,dc=com
x509ValidityNotAfter: 20170618240000Z
X509SerialNumber: 237747983070111291030884597428865776599352552985
FSID:: RjAwMEhGIA==
FSID:: RjAwMEhHIA==
FSID:: RjAwMEhIIA==
FSID:: RjBUQzAwIA==
FSID:: RjBUQzAxIA==
FSID:: RjBUQzAyIA==
FSID:: RjBUQzAzIA==
FSID:: RjBUQzA0IA==
FSID:: RjBUQzA1IA==
FSID:: RjBUQzA2IA==
FSID:: RjBUQzQzIA==
FSID:: RjBUQzQ0IA==
FSID:: RjBUQzQ1IA==
FSID: F0TC46
FSID: FTC001
FSID: FTC002
FSID: FTC003
FSID: FTC004
FSID: FTC005

---------- Post updated at 08:43 AM ---------- Previous update was at 08:40 AM ----------

oh, would the '-B' option be the ticket?

Quote:
-B print non-ASCII values and use old output format (attr=value)
It seems to return what I need


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!


---------- Post updated at 10:27 AM ---------- Previous update was at 09:43 AM ----------

yup, that was it. using the -B option gets rid of the base64 encoded values for some reason.

Last edited by RudiC; 05-22-2017 at 11:25 AM.. Reason: Added CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ls returning differing results

Hi there. I have several raspberries, Im currently logged (ssh) into 2 of them, both identical os, same user, both up to date. Both mounted to a Nas, but when I ls the same dir on the Nas one lists all the 1498 files, one lists a random subset of files, about 30. I had a problem yesterday... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies

2. UNIX for Beginners Questions & Answers

Results of ldapsearch piped to grep are cut off

ldapsearch -x -LLL -E pr=200/noprompt -h abc-loc.somecompany.com -D "account@somecompany.com" -w password -b "cn=groupname,ou=Resource,ou=groups,dc=abc,dc=somecompany,dc=com" | grep member Results are: member: CN=Hanson\, Joe,OU=End Users,OU=Accounts,DC=abc,DC=somecompany,DC=com member:... (3 Replies)
Discussion started by: who10
3 Replies

3. UNIX for Dummies Questions & Answers

Need someone to decrypt an encoded text

Hello everybody, i have a big issue, i have to decode a big text in base64 a lot of times but there are 2 problems: i am a noob with unix system and shell, and i have problems with openssl and i can't decode anything. can anyone decode for me that base64? need a powerful computer, i can give some... (16 Replies)
Discussion started by: supermarco2020
16 Replies

4. Shell Programming and Scripting

Base 64 encoded string

Could anyone of you please give me some idea to decode base 64 encoded value in ksh? (4 Replies)
Discussion started by: nram_krishna@ya
4 Replies

5. UNIX for Advanced & Expert Users

Counting the ldapsearch results

Hi, Is there way to count the number of results in the ldapsearch, looking at the manpages i dont see an option, Using the following ldapsearch command to list attribute (User-Id=100) under my ObjectClass=my-Process, returns the entries matching the User-Id=100, and the problem i face here is... (0 Replies)
Discussion started by: ennstate
0 Replies

6. UNIX for Dummies Questions & Answers

Why are there LFs in my base64?

And is there a good way of taking them out? I've been playing around a bit with using b64 to embed images in HTML (and trying to stay within the spec). I've noticed that with openssl's base64 encoder, the output files have newline characters @ every 65th column or so. This renders them useless,... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

7. UNIX for Dummies Questions & Answers

How to trim ldapsearch results

I have a script that iterates through all the users that have logged in to the system for the past day and pulls out their role(s), adding them to a file. The iteration part is working just fine, but the issue I have is with the result. When I do the LDAP query, the results I get are: ... (2 Replies)
Discussion started by: a_calder
2 Replies

8. Shell Programming and Scripting

Script returning null results

Hi, The following shell script returning null results could you please tell me whats the problem in script, ********************************* #!/bin/ksh . $HOME/conf/systemProperties/EnvSetup.properties a=`date +"%y%m%d"` set -x for i in `cat... (2 Replies)
Discussion started by: shivanete
2 Replies

9. UNIX for Dummies Questions & Answers

not able to run base64 exe

Hi, I have copied base64.exe under base64-1.3 folder and i am trying to run base64.exe from another folder called Request. But i am getting the following error message. mga.ksh: base64: not found Please let me know how to execute the base64.exe from a directory where it is not installed. ... (0 Replies)
Discussion started by: lotus123
0 Replies

10. UNIX for Dummies Questions & Answers

I'm looking for someone who have Base64 binary

I need to install the base64 encryption method on a UNIX machine under AIX5.2. I've received a tar file but it is only C source , can you help me please. (sending me a binary base64 or to compile my source) Thanks by advance (3 Replies)
Discussion started by: Bruno_LAMOUR
3 Replies
Login or Register to Ask a Question