Thanks for posting!!

-----Original Message-----
From: Ken Cornetet [mailto:[email protected]] 
Sent: Tuesday, July 10, 2012 11:39 AM
To: Barry Brevik; perl Win32-users
Subject: RE: Win32::LookupAccountSID()

http://code.activestate.com/lists/perl-win32-users/26301/

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Barry Brevik
Sent: Tuesday, July 10, 2012 2:28 PM
To: perl Win32-users
Subject: Win32::LookupAccountSID()

I'm having trouble with Win32::LookupAccountSID() and I was hoping
someone has experience with this function. I'm dragging user SIDs out of
the registry under HKEY_USERS. Then I specify our domain controller as
the "system" parameter (though I've tried both using a local machine,
empty string and undef). I've tried taking out the {} and the dashes in
every permutation and I still get the error "The security ID structure
is invalid."

Here is what I'm doing:

use strict;
use warnings;
use Win32;

my $usersid = '{S-1-5-21-1406052347-744958519-16733337701-1424}';

my $accountname = '';
my $siddomain   = '';
my $sidtype     = '';
Win32::LookupAccountSID("qbert", $usersid, $accountname, $siddomain,
$sidtype); print "error......: ",
Win32::FormatMessage(Win32::GetLastError()),
"\n";

Barry Brevik

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to