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

Re: Active directory and openldap



Today at 9:51am, Jehan PROCACCIA wrote:

> Do you happen to have a sample source perl code to transform the
> cleartext password to Unicode unicodePwd attribute for AD ?
> Also as anyone implemented a protected connection "SASL/GSSAPI or TLS)
> to bind to AD as a privileged user to make these changes" .

With the cleartext password in $opw, the following will generate a
unicode version (complete with the required double quotes (") around
it):

my $upw = pack "v*", unpack "C*", qq("$opw");

I would have to research to remember which Active Directory discussion
board I stole that from.... ie, if it does not work, please don't blame
me -- but it seemed to work (as long as the passwords were not too long)
in testing here.

-- 
Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
                    === God Bless Us All ===