ShawnW Posted May 14, 2010 Share Posted May 14, 2010 I am trying to grab all permissions from all folders on one of our servers so they can be analyzed and possibly cleaned up and reorganized when we move to a new server. I took a look at these functions and they seem like they might help but I have 2 problems. First, I am not sure if _Net_Share_FileGetInfo() can look at all files or if it can just look at open ones like in the example from the help file. Second, _Net_Share_PermStr() although it only interprets data from _Net_Share_FileGetInfo() so the problem is there, does not seem to return proper permissions for folders. I tried the example in the help file and looked at open files. I found if I have a file open I might see R--E--- but in the same directory (all inherited permissions) a folder would say only R------ even if it has execute permissions as well. This might be a problem or limitation of the netapi32.dll call but I don't have a lot of knowledge about that dll. Is there any way to view full correct permissions on folders? Before you suggest others though know that I already tried xcacls.exe and it is worse because even the files in the folder said 'R' only with no 'E'. I also tried SetACL.exe which returned only half of the listed users with permissions, and said they all had FULL permissions which they do not. Link to comment Share on other sites More sharing options...
99ojo Posted May 14, 2010 Share Posted May 14, 2010 Hi, for this kind of tasks, i always use dumpsec. You can dump security information with various report options. ;-)) Stefan Link to comment Share on other sites More sharing options...
water Posted May 14, 2010 Share Posted May 14, 2010 (edited) Hi,for this kind of tasks, i always use dumpsec. You can dump security information with various report options.;-))StefanAnd I have written a Script to display the dumpsec information in a treeview. It lets you search for directory names, groups, users and marks the directories the user/group can access.If you like I can send you a copy. It's been written quick&dirty so it's nothing I can post here without some cleaning up beforehand.An old version with a screenshot has been posted here. Edited May 14, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
99ojo Posted May 14, 2010 Share Posted May 14, 2010 Hi water, i'm intersted. If you want PM me the script and maybe some description... Thanks so far... ;-)) Stefan Link to comment Share on other sites More sharing options...
ShawnW Posted May 14, 2010 Author Share Posted May 14, 2010 Thanks 99ojo! Just the tool I was looking for. I might have use for the script in the future water, for now this is ok but I'll know who to contact later if I need something like that =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now