Re: Searching Network Share Permissions




"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

  • Searching Network Share Permissions
    ... I need to search for 'Everyone' and 'Authenticated Users' permissions on ... every network shares from about 100 Windows Server 2003 servers we have and, ... list only the network shares that have such permissions. ... useful to scan a specified group of servers. ...
    (microsoft.public.scripting.vbscript)
  • Re: D-Link: incompetent or evil?
    ... it's only one in a list of servers. ... which they're clearly failing to even contemplate. ... In the design stage, one has to ask ``what does this depend on?''. ... hardcoded lists are clearly failing the test of ``can we easily change ...
    (comp.unix.bsd.freebsd.misc)
  • Re: WINS Setup Issue
    ... First of all if you disable the computer browser service on ... network and get their local lists. ... > all servers such as our WINS, DHCP, DNS etc., are located on the ... > network and the other 2 sites only house computers and printers. ...
    (microsoft.public.windows.server.networking)
  • Re: challenge: end of life for 6.2 is premature with buggy 6.3
    ... They started with shared hosting and moved to a dedicated box when I volunteered to help with the backend work. ... For several years we ran one server hosting dns, imaps, smtps, mail lists and websites. ... We now have the embarrassment of riches of two servers; one for web and the old one for the rest. ... and doesn't guarantee zaroo bugs - just a high likelihood ...
    (freebsd-stable)
  • Re: Slow to open shares
    ... All my clients point to 2 of my domain controllers for DNS. ... All the servers reside in subnet A. All ... >> in their browse lists. ...
    (microsoft.public.windows.server.active_directory)