PaulDotCom mailing list archives

OpenLDAP userPassword field


From: matt.wilbur at gmail.com (Matt Wilbur)
Date: Sun, 13 Jun 2010 11:29:32 -0700

David,

I initially sent this as a fix:
echo -n "W6ph5Mm5Pz8GgiULbPgzG37mj9g=" |base64 -d |hexdump -v -e '/1 "%x"'

It SEEMED to work, returning this:
5baa61e4c9b93f3f68225b6cf8331b7ee68fd8

Byte Bucket, in moderating, noticed that I still didn't have it quite right
(I'd added -v to hexdump).. he pointed out that the hexdump format string
needs to be "%02x", vice "%x".. (it dropped the 0's)..

echo -n "W6ph5Mm5Pz8GgiULbPgzG37mj9g=" |base64 -d |hexdump -v -e '/1 "%x" '
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8

should do the trick. Thank you Byte for pointing out my glaring inattention
to detail :)

-Matt

On Wed, Jun 9, 2010 at 6:04 PM, David Porcello
<DPorcello at vermontmutual.com>wrote:

Hi all,

Does anyone know of a way to decode OpenLDAP's non-salted userPassword
values from this:
{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

To this? (the underlying SHA hash):
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8

I know it needs to be base64 decoded to hex bytes, but I can't figure out
how to do this without base64 decoding to ASCII first, then converting that
to hex:

echo -n W6ph5Mm5Pz8GgiULbPgzG37mj9g= |base64 -d - |hexdump -e '/1 "%x" '

The problem with decoding to ASCII first is some of the output is control
chars, such as line breaks, which hexdump isn't handling properly:

What I'm hoping for:
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8

What hexdump is giving me:
5baa61e4c9b93f*  68225 b6cf8331b7ee68fd8

As you can see parts of the hash are lost in translation. I've been working
on this for weeks and I'm out of ideas (short of learning Java/C). I found
an online converter that can do this properly (
http://home1.paulschou.net/tools/xlate/), but I need to decode 10,000+
values..

Help!!
d.

NOTICE: The information contained in this e-mail and any attachments is
intended solely for the recipient(s) named above, and may be confidential
and legally privileged. If you received this e-mail in error, please notify
the sender immediately by return e-mail and delete the original message and
any copy of it from your computer system. If you are not the intended
recipient, you are hereby notified that any review, disclosure,
retransmission, dissemination, distribution, copying, or other use of this
e-mail, or any of its contents, is strictly prohibited.

Although this e-mail and any attachments are believed to be free of any
virus or other defects, it is the responsibility of the recipient to ensure
that it is virus-free and no responsibility is accepted by the sender for
any loss or damage arising if such a virus or defect exists.
_______________________________________________
Pauldotcom mailing list
Pauldotcom at mail.pauldotcom.com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pauldotcom.com/pipermail/pauldotcom/attachments/20100613/02f4436d/attachment.htm 


Current thread: