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

SOS Please : I have written a script that will check access control and permissions on every folder and subfolder on a given machine (for this I have used Win32::FileSecurity library) and a recursion routine to access all folders and sub-folder. The script works fine and returns a list of all that have access to any folder or subfolder in the server, however, my question is : how can I get my script to recognise and differentiate between groups and single users (eventually I will delete all single user access and leave all groups intact) Many thanks to your help brothers
  • Comment on Is it a group account or a user account?

Replies are listed 'Best First'.
Re: Is it a group account or a user account?
by Rex(Wrecks) (Curate) on Jun 06, 2002 at 17:16 UTC
    Win32::AdminMisc has a GetGroups method and a GetUsers method. Using those and comparing to your existing rights list should let you know what you are dealing with.

    Also the external net command may be of help. Using system to get the output of:
    net user net user /domain net group \\domaincontroller net localgroup

    should get you all the info you need to compare to. Keep them in a list and compare your directory and file findings against them.

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!