You can use the built-in Win32::LookupAccountSID to get the info.
Win32::Security::SID looks like a nice wrapper for these functions, but I
haven't had the chance to try them out.

But Joe is correct, if it isn't resolving it is either a reference to a
deleted account or you have a problem w/the trust/secure channel to the
account's domain.  I think resolving the domain would go a long way in
answering this question.  Then a little tweaking to add another sub for
double checking an account when you come across a SID.  A quick conversion
of some sample SID/accounts in your own domain, and those you trust, should
allow you to regex the SID of the unknown account to get the parent domain.

................................
Kind regards

Glenn Deans
Sr. Systems Engineer
Siemens Business Services, Inc.
Bellefontaine, OH USA

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Thursday, October 14, 2004 7:29 PM
To: 'hugh s'; [EMAIL PROTECTED]
Subject: RE: members - names & SIDs

It sounds like whatever interface you are using resolves them to names if it
can. If it comes back as a SID it is probably for a deleted user or a user
on the other side of a failed trust.

You can try to do it manually with sidtoname
(http://www.joeware.net/win/free/tools/sidtoname.htm) but mostly likely it
won't be able to resolve either. You can determine if it is a deleted user
versus domain issue by chopping the RID off the end and sending that into
sidtoname. E.g. S-1-5-21-3005802260-766035279-3743273540


  joe
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of hugh
s
Sent: Thursday, October 14, 2004 2:52 PM
To: [EMAIL PROTECTED]
Subject: members - names & SIDs

Using the winnt interface I obtain an ADSI 'Group' object for a given pc.  I
then get the members of the group with

 my $grp = $pcGroup->Members();

Most of the members return as names, but I get a few that look like this:

S-1-5-21-3005802260-766035279-3743273540-12405

I assume this is the SID(?)  How do I go from this to the name?


                
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
_______________________________________________
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
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to