That was a huge help! I think I misspoke.... I knew I was attempting to bind to ADSI and not WMI in the second snippet. My problem was in using alternate credentials for an OLE ADSI binding.
In case anyone reads this in the future and would like my resolution, here it is:
$winntobj = Win32::OLE->GetObject('WinNT:')
or croak( 'Cannot create WINNT object - ', $! );
if ($debug) {
print "Attempting bind to WINNT on $server for authenticating $use
+r/$password...\n";
}
$userobj = $winntobj->OpenDSObject(
"WinNT://$server/$pworduser,User",
$user,
$password,
1
);
my $err = Win32::OLE->LastError();
if ($err == 0) {
print STDOUT "Successful authentication!\n";
else {
print STDOUT $err;
}
$userobj->SetPassword($newpassword);
...and this works as long as the authenticated user has administrative rights. I'd still be interested in knowing if anyone has a WMI solution for this as well, but I am very happy using ADSI. Thanks again!!!