Determining machine SID?

J

Jon Pope

How can I locate the SID of the host machine? I've looked online, and there
are plenty of examples on retrieving the current user's SID, but not the
machine.


Cheers, Jon
 
L

Larry Smith

How can I locate the SID of the host machine? I've looked online, and
there are plenty of examples on retrieving the current user's SID, but not
the machine.

On the network a machine is identified as "DomainName\MachineName" (or
alternatively "MachineName@DomainName" using UPN format) so you should be
able to pass this to whatever .NET function exists that returns a SID
(you'll need to retrieve the domain and machine name obviously). I don't
know what .NET functions are involved but "LookupAccountName()" is what
you'ld rely on using the WINAPI directly. Note BTW that the SID for the
SYSTEM account is fixed at S-1-5-18 but it changes to
"DomainName\MachineName" (whatever its SID is) whenever the SYSTEM account
is authenticated over the network.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top