$10 to whoever can write a simple batch file for me [EDIT]Got what I wanted[/EDIT]

Viper GTS

Lifer
Oct 13, 1999
38,107
433
136
This will probably be just a couple lines, but I don't want to deal with it. I'll PayPal you the money on delivery of a working script.

Basically what I need is a listing of the permissions of every main directory on a given drive.

Syntax to be used:

scriptname <drive> <output file>

The script should:

1) Take the drive letter from the command line
2) Use some method ("dir /ad /b" will work, you can use whatever you want) to obtain a bare listing of all top level folders
3) use showacls to display permissions for each top level folder (showacls "<driveletter>\folder")
4) Store all output in a single filename specified from the command line (append all output using >>)

You can use an intermediate file if you want, just delete it when you're done (ie output dir results to a temp file, read line by line from the temp file, then delete the temp file).

showacls is available as part of the Windows Server 2003 Resource Kit Tools:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en

A small piece of an example output (that I created manually):

w:\Admin
AIR-NOISE\Domain Users Change [RWXD]

w:\Applications
AIR-NOISE\Domain Users Change [RWXD]

w:\Call Center
AIR-NOISE\Domain Users Change [RWXD]


Viper GTS
 

Viper GTS

Lifer
Oct 13, 1999
38,107
433
136
Originally posted by: hevnsnt
if you know what you want, why don't you just do it?

This will take 10 minutes for someone with more programming experience than me, &amp; would take me quite a while (to track down the syntax I'd need for everything).

It's simple economics.

Viper GTS
 

hevnsnt

Lifer
Mar 18, 2000
10,868
1
0
echo Displaying Permissions on folders on %1
@echo off
dir %1\ /ad /b > out.log
FOR /F "eol=; tokens=1,2,3* delims=," %%i in (out.log) do showacls.exe "%1\%%i" >>%2
del out.log
 

Viper GTS

Lifer
Oct 13, 1999
38,107
433
136
Originally posted by: Jzero
I could write something like this, but it's already been done a bajillion times.

I use DumpSec (formerly DumpACL) for this kind of task.

I figured as much, but I hadn't had much luck finding one that would do exactly what I wanted. Again, economics...

I'll take a look at that one.

Viper GTS
 

Viper GTS

Lifer
Oct 13, 1999
38,107
433
136
Originally posted by: FoBoT
what operating system(s) does it need to work on? XP and server 2003? windows 2000 server? NT ?

I'm using it to document file shares on Win2K servers, showacls should work for 2K/XP/2K3.

No NT.

Viper GTS
 

flot

Diamond Member
Feb 24, 2000
3,197
0
0
You mean like this?

dir %1 /ad /b | showacls >> %2

I don't know how showacls works but that certainly seems like it would do everything you want?

Edit: Oh I see, I can't get my hands on a copy of showacls, but it only takes in a single line of input? Weak.
 

simms

Diamond Member
Sep 21, 2001
8,211
0
0
Bump. I just paid ghostman Paypal to solve a line of HTML code that wouldn't format nicely. ;D