in reply to Change Password on AD via Perl/LDAPS/Convert::BER

(After I posted this I kinda realized that you're not running this on a windows box so it's completely usless. I'll leave it for people wondering how to do this on Wintel machines though)

Uhmm.. I don't have an answer for your method of doing this, but I thought I'd offer an easier way to change passwords in AD.. as long as you have ADSI installed..

use strict; use WIN32; use Win32::OLE; my $domain = Win32::DomainName(); chomp (my $user = shift @ARGV); chomp(my $new_pw = shift @ARGV); if (my $objUser = Win32::OLE->GetObject("WinNT://$domain/$user,user")) + { $objUser->SetPassword($new_pw); }
and that's it. It takes the username and new pwd as input. Obviously this hasn't been idiot proofed at all.. but it shows you the functionality of ADSI. But then again, you may have different reasons for not doing it this way.

Hope this helps,
Rich