ResolveAccount doesn't look to have a second parameter for servername.

Reason being is that it will resolve the name with the first (only) trust
relationship it finds that will resolve the SID, and since SIDs are supposed
to be unique, (with the exception of local groups like "Administrators",
which would always resolve locally - Someone correct me if I have it
wrong..) there's no need to tell it a servername.

I can see why you might want to do this, for a non-domain system, but in
that case, I don't know how to do what you want because you can
ResolveSid("THATPC\\username") and providing you get the permissions and
trusts to do what you want, so in theory it should work, but I've never
tried, and... well.... It's still the opposite of what it looks like you
want to do, anyway.

Lastly, resolving remote sids for sids that exist on the local box, doesn't
seem possible, because it will return true, but only because it found it
locally.

Hope this helps.

Steven

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 21, 2003 9:15 AM
To: [EMAIL PROTECTED]
Subject: Win32::Perms - ResoveAccounts not working on Remote SID


Ladies and Gentlemen,

Having a bit of trouble with resolving the following SID.  Or any remote SID
for that matter.  IF the SID is on my machine and the remote machine no
problem.  For example the SID for administrator or Guest.  In this example
the SID is for the Server Operators Group which is on Windows 2000 Server
but not my Win 2000 Workstation.  Nothing comes back.  Any thoughts?

Thanks in advance to those who post.


use Win32::Perms;

my $server = shift || Win32::NodeName;
my $sid = 'S-1-5-32-549';

        print "$sid , $server\n";
        my $resolved = Win32::Perms::ResolveAccount($sid,"\\\\$server");
        my $straight =
Win32::Perms::ResolveAccount('S-1-5-32-549','\\127.0.0.2');
        print "resolved $resolved 2nd
$straight\n";


_______________________________________________
Perl-Win32-Admin mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to