Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks
Can I obtain users and groups information, such as directory and sub-directory level access permissions, directly from the SAM of the Windows Registry and dump it on screen?? Can I also modify it and rewrite it back??
I have just started using the Win32::TieRegistery module, and it seems that it can do the trick, but I am not sure how to go about it, some help and a little example code can go a long way please.
Regards

Replies are listed 'Best First'.
(tye)Re: Registry SAM Extraction
by tye (Sage) on Jun 19, 2002 at 16:33 UTC

    No. Although the SAM is stored in the Registry, I don't think trying to get something useful via the Registry APIs is likely to work (I never got it to work).

    There are separate APIs for dealing with this information. You can look at Win32::Perms (which is not on CPAN) and Win32::FileSecurity to see if they offer what you need.

            - tye (but my friends call me "Tye")