How can I print NTFS perms of all shares on Server?

O

OscarVogel

How do I print out a list of NTFS permissions for files & folders with-in
each shared folder on a Windows 2000 Server?

I want to check to make sure that permissions are set correctly. So I tried
clicking on each shared folder & viewing the Security tab. (All SHARE perms
are Full Control for Everyone). But all that clicking that takes way too
long, especially if I try to write down the permissions. There's got to be
an easier way (w/out buying 3rd party software). Is there a Resource Kit
utility? Is there a native command line utility?

I'll really appreciate any suggestions on how to do this right. Thanks!
 
C

Chriske911

How do I print out a list of NTFS permissions for files & folders
with-in each shared folder on a Windows 2000 Server?
I want to check to make sure that permissions are set correctly. So I
tried clicking on each shared folder & viewing the Security tab. (All
SHARE perms are Full Control for Everyone). But all that clicking
that takes way too long, especially if I try to write down the
permissions. There's got to be an easier way (w/out buying 3rd party
software). Is there a Resource Kit utility? Is there a native
command line utility?
I'll really appreciate any suggestions on how to do this right.
Thanks!

take a look at the CACLS command

you can pipe this to a text file and then do with it as you please

grtz
 
O

OscarVogel

I don't see how to use cacls to get NTFS perms for folders only, or maybe
just one folder. Using "cacls *" tells me more than I want to know. Do you
know if there's a way for it to return perms for either a particular folder,
or for all folders, but not files?

But anyway, yes the CACLS command is sure better than licking on each shared
folder's Security tab. So thanks for solving my problem.
 
O

OscarVogel

Disregard my last reply. I see now after looking at the print out that
"cacls *" DOES in fact print out just the perms of each shared folder. For
now, that's exactly what I want. Thanx!
 
P

Pegasus \(MVP\)

OscarVogel said:
How do I print out a list of NTFS permissions for files & folders with-in
each shared folder on a Windows 2000 Server?

I want to check to make sure that permissions are set correctly. So I tried
clicking on each shared folder & viewing the Security tab. (All SHARE perms
are Full Control for Everyone). But all that clicking that takes way too
long, especially if I try to write down the permissions. There's got to be
an easier way (w/out buying 3rd party software). Is there a Resource Kit
utility? Is there a native command line utility?

I'll really appreciate any suggestions on how to do this right. Thanks!

I knocked together this little batch file that will do the trick.
In stage 1 it pops up a notepad that gives you the opportunity
to review your shares list and remove those that are inappropriate.

Line1 @echo off
Line2 if exist perms.txt del perms.txt
Line3
Line4 net share | find ":" | find /i /v "Default share" | find /i /v "IPC$"
| find /i /v "spooled" | find /i /v "Remote Admin" | find /i /v "print$" >
shares.txt
Line5 notepad shares.txt
Line6
Line7 for /F "tokens=2*" %%a in ('type shares.txt') do call :Sub %%a %%b
Line8 echo Share permissions are now stored in perms.txt.
Line9 goto :eof
Line10
Line11 :Sub
Line12 set dir=%1
Line13 :loop
Line14 shift
Line15 if "%1"=="" goto cacls
Line16 set dir=%dir% %1
Line17 goto loop
Line18
Line19 :cacls
Line20 cacls "%dir%" >> perms.txt
 
G

Guest

Get DumpSec (Free software) from http://www.systemtools.com/free.htm

I used it to document all my shares and folders permissions and to create an
exceptions list before migrating a file server. It's a very useful tool. I'd
have spent hours trying to find out everything without it.

:)
 
B

BD

But anyway, yes the CACLS command is sure better than licking on each shared
folder's Security tab. So thanks for solving my problem.

I agree. Your monitor will get all gukky.

*sorry - couldn't resist*

BD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top