Re: Searching Network Share Permissions

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thank you very much for your quick answer! :-) Would it be possible also to
show the share permission along with everyone or authenticated users. Eg:
\\server1\share: Everyone Full Control
\\server2\share2: Everyone Modify
\\server3\share3: Everyone Read

Thank you very much!

"Pegasus (MVP)" wrote:


"Blosjos" <Blosjos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:85620FD1-A9AE-48C1-A2CD-091A385E7ECB@xxxxxxxxxxxxxxxx
Hello,

I need to search for 'Everyone' and 'Authenticated Users' permissions on
every network shares from about 100 Windows Server 2003 servers we have
and,
then, list only the network shares that have such permissions. Do you know
any effective tool or script to get this? I tried shareenum but it is not
useful to scan a specified group of servers.

Any input would be apreciated.

Thank you!

You could use this script:
01. const PCList = "c:\temp\PCs.txt"
02. Const Group1 = "EVERYONE" 'Must be upper case!
03. Const Group2 = "AUTHENTICATED USERS"
04.
05. Set objWshShell = CreateObject("WScript.Shell")
06. Set objFSO = CreateObject("Scripting.FileSystemObject")
07. Set objFile = objFSO.OpenTextFile(PCList)
08. While Not objFile.AtEndOfStream
09. CheckShares objFile.ReadLine
10. Wend
11. objFile.Close
12.
13. Sub CheckShares(strComputer)
14. Set ObjExec = objWshShell.Exec("srvcheck.exe \\" & strComputer)
15.
16. Do While Not ObjExec.StdOut.AtEndOfStream
17. Line = UCase(ObjExec.StdOut.ReadLine)
18. If InStr(Line, "BAD COMPUTERNAME") > 0 Then
19. WScript.echo strComputer & " is unreachable"
20. Exit Sub
21. End If
22.
23. If Trim(Line) <> "" Then
24. If Left(Line, 2) = "\\" Then
25. Name = Line
26. Else
27. If InStr(line, Group1) > 0 Then WScript.Echo "Share=" & Name & ": "
& Group1
28. If InStr(line, Group2) > 0 Then WScript.Echo "Share=" & Name & ": "
& Group2
29. End If
30. End If
31. Loop
32. End Sub

To make it work you must store a list of your servers in
c:\temp\PCs.txt, e.g. like so:
Server1
Server2
The script expects srvcheck.exe to be in the path. You can
download it from the Windows Resource Kit. Unfortunately
it lists both file and printer shares.



.



Relevant Pages

  • Re: Permissions Issue
    ... I have a top level site that is our company portal, ... view rights to the Top Level site and to most department sub sites. ... So I go to the permissions for the sub site. ... Authenticated Users from the Top Site and gives ownership of the top ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Folder depth & cacls
    ... >I am trying to edit the permissions of two folder trees (on 2 servers) using ... >either cacls or xcacls (want to add permissions for a specific group so don't ... >sure it's related to the depth of some folders. ... call:sub "%%a" ...
    (microsoft.public.windows.file_system)
  • Re: Security Problems with Office 2003 Outlook
    ... Make sure that you haven't defined any additional permissions for you ... users on the Mailbox Store of your servers. ... 'Everyone' or 'Authenticated Users' full control on the Mailbox Store ...
    (microsoft.public.win2000.active_directory)
  • Microsoft Secure DNS and Authenticated Users group interdependencies
    ... I would really appreciate anyone who considers themselves DNS experts to take a good look at this post. ... Only if Authenticated Users group has a write access will the record update. ... If the a record is set with default permissions and Authenticated Users has elevated permissions set, after the client's successfully updates the record, the client is added to the ACE with WRITE permissions and Authenticated Users permissions get reset. ...
    (microsoft.public.windows.server.dns)
  • Re: Error "The system cannot find the file specified" on files
    ... I will see if my customer can do this for me as I cannot easily get physical ... both of these servers are domain controllers. ... command line utilities and GUI tools, tried to set permissions. ... Security tab in Windows Explorer doesn't appear. ...
    (microsoft.public.windows.file_system)