TGI has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone know of a reliable way to get the machine SID for a given windows box? For what it's worth, I only need to get the value for the machine I am running on--I don't need to query a remote machine through WMI.
It's supposedly available in the HKEY_LOCAL_MACHINE SECURITY\SAM\Domains\Account registry key, but the SECURITY hive is locked down and I can't access it.
Win32::LookupAccountName will give me user SIDs, and Win32::Security::SID will parse the results and give me a clean text string from them.
The only missing piece of the puzzle is a reliable way to obtain the machine SID. I'd appreciate any insight anyone has into the problem.
TGI says moo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32: Getting the Machine SID
by syphilis (Archbishop) on Oct 16, 2007 at 01:09 UTC | |
by TGI (Parson) on Oct 16, 2007 at 22:50 UTC | |
Re: Win32: Getting the Machine SID
by Argel (Prior) on Oct 17, 2007 at 00:23 UTC |