Retrieve a list of folder permissions to unshared folders on a remote computer

Started by jtrask, June 17, 2015, 01:34:30 PM

Previous topic - Next topic

jtrask

I created a script that would access computers on the network and create a tab-delimited text file of each server's shares and who has access to them.  That wasn't good enough. 

I don't need to know who has access to the shares, I need to know who has access to the first level folders beneath those shares.  The Win32 Networking extender won't allow me to do that, will it?

I was trying to do it via WMI.  I got as far as creating a list of folders, but I ran into trouble when trying to retrieve the DACLS from folders on a remote computer.

td

What method are you using to get a listing of remote machine folders associate with the remote's share?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Not sure that it will work  but if you are using the Network Extender, you could give the following a try using the hidden administrative shares:

Code (winbatch) Select

list = wntAccessList('server-name', '\\server-name\C$\windows', 300, 2)


There should also be a 'D$' hidden administrative share if your server has a  D disk.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

jtrask

Thank you.  I tried wntAccessList previously, but it didn't work.  It worked when I tried it the way you suggested. 

I don't know if it was the object type flag.  I don't recall what I used before, and it's been deleted at least twice since then.

ChuckC

The object-type value is critically important, as it determines what underlying Win32 API functions are called to obtain security descriptor information for the specified object.  A share is not the same as a folder under the share, which again is different from a printer, a native NT service, a windowstation, a desktop, etc..., and it is the object-type value that is necessary to properly distinguish them apart from each other.