[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: userPassword question
Bob Bick wrote:
> >From a newbie...
>
> When I retrieve an LDAP attribute value for the "userPassword"
> attribute, the attribute value appears to be encrypted (probably a
> good thing). However, I would like to compare the userPassword with
> the actual password.
>
> My environment:
>
> Michigan LDAP server running on Solaris
> LDAP server is being accessed through JNDI (Java) interface and Sun's
> LDAP service provider (i.e. JNDI wraps LDAP client)
>
> NOTE: JNDI does not support an ldap_compare_s() capability.
>
> Any help would be greatly appreciated,
> Bob
Hi Bob-
I think there are two ways to do this assuming you know the password in
the LDAP server is encrypted:
1. I don't know if CRYPT is supported in JAVA or not, but decrypt the
usrPassword value and
compare it (something like strcmp in C or C++) in your client
program.
2. The other is to encrypt the password you have in the client program
(same as the way the LDAP
server is configured) and compare as is.
I hope this helps.
Regards,