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

Re: userPassword attribute - cleartext but still being encrypted ?



Hi,

On Wednesday 09 October 2002 10:52, you wrote:
> I'm coding a utility that needs to have the "userPassword" attribute's
> values as clear text.
>
> At the moment my sample input ldif file contains the following:
>
> userPassword: password
>
> I then add the ldif with "ldapadd", after it's added successfully I do an
> "ldapsearch" and it shows the following for "userPassword":
>
> userPassword:: d29yZHBhc3M=

what you see here is no encryption, but simple Base64 encoding you
always have to expect and to deal with, because some characters
are not allowed verbatim in LDIF files.

The two colons after the attribute name indicate tat the folloing value
is Base64 encoded.

You may use the perl module MIME::Base64 to do such decodings
and encodings.

I decoded your output with the command
  perl -e 'use MIME::Base64; print decode_base64("d29yZHBhc3M=");'
to
  wordpass
(So, I think your input was "wordpass" instead of "password" ;-)

Yours
Peter

-- 
Peter Marschall     |   eMail: peter.marschall@mayn.de
Scheffelstraße 15   |          peter.marschall@is-energy.de
97072 Würzburg      |   Tel:   0931/14721
PGP:  D7 FF 20 FE E6 6B 31 74  D1 10 88 E0 3C FE 28 35