Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve A Files Security Properties 2

Status
Not open for further replies.

maleyj

MIS
Nov 24, 2001
27
0
0
US
I have a project to retrieve the properties of a particular executable stored on our file servers. What I am trying to find out is if the access to the file has been set to the group "Authenticated Users" instead of "Everyone". I have looked all over the web and all through the Microsoft site to no end. Maybe I am not structuring my query right.
Any help would be greatly appreciated.
 
Hello maleyi,

Check out wmi documentation of win32_logicalfilesecuritysetting and its getsecuritydescriptor method and dacl's properties.

regards - tsuji
 
You can also use the AdsSecurity dll if you search on it you should get a lot of hits.

Path = "C:\boot.ini"

Dim ADSSEcurity
Dim sec
Set sec = CreateObject("ADsSecurity")
Dim sd
Dim dacl
Dim ace

Set sd = sec.GetSecurityDescriptor("FILE://" & Path)
Set dacl = sd.DiscretionaryAcl
msgbox sd.Owner
'-- Show the ACEs in the DACL ----
For Each ace In dacl
msgbox ace.Trustee &vbcr & ace.AccessMask & ace.AceFlags & ace.AceType

Next
 
Thanks guys, the only question I have is I am still running in an NT domain, we have not created an AD forest yet, will these suggestions still work? I assume I would have to resister the AdsSecurity.dll before I could use MisterNiceGuy's suggestion.

Thanks again
 
Well I'm not really sure if you can incorporate this into a VBscript but there isa file names cacls which if used as so:

cacls c:\boot.ini will returnt he following:
C:\boot.ini BUILTIN\Power Users:R
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
Just do a search for this file. It can also be used to set permissions on file(s) or directories. I used it to rearrage the security on the domain users folders. The Domain admin before me only gave the user directory rights which meant I couldn't monitor what users were storing on the user drives. but with CACLS I was able to do the users\directory stucture with one command....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top