On 25/01/07, Howard Lowndes <[EMAIL PROTECTED]> wrote:

I am querying the userPassword field in an LDAP database.

The user's password is stored in the database as:
{SSHA}Z7072f78+4XQTrps38xKXFIrrFSPEHvd
but the ldapsearch is returning it as:
userPassword:: e1NTSEF9WjcwNzJmNzgrNFhRVHJwczM4eEtYRklyckZTUEVIdmQ=

What format is this latter?


This smelt of being a Base64 encoding (don't know why, maybe that "=" at the
end), so I found  http://www.motobit.com/util/base64-decoder-encoder.asp,
pasted that string to the bottom box and got the {SSHA} string at the top.

Conclusion - it's Base64 encoding of the data.

Would I be better off trying to do an LDAP compare, in which case, what
should the compare statement look like?


I'm not sure you want to do that - if the search depends on the password and
it's the wrong password then how would you differentiate between no match (
e.g. "user not found",  for instance) and just a wrong password?

--Amos

Reply via email to