computer names and samba shares

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Jun 16 03:59:59 EDT 2004


| can anyone tell me how to find the list of computer names on 
| a samba network, and
| 
| the list of shared folders / devices on a samba networked computer?
| 
| We have a GNU/Debian Server, and I am trying to do it first 
| from a Win2000 machine (though ideally, the code should be 
| platform-independent).

The meaning of "the list of computer names on a samba network"
is not terribly well defined, but taking the request at face
value, there are several possibilities:

1) NET VIEW

   (From NET HELP VIEW) "When used without options, [NET VIEW] 
    displays a list of computers in the current domain or network."

2)
http://tgolden.sc.sabren.com/python/win32_how_do_i/list_machines_in_a_domain
.html

   This uses the WinNT: object under Windows.

There are other options, using the win32net code, Active Directory (either
via ADSI objects or via LDAP), and the Samba equivalent to NET VIEW (check
the Samba docs for that), but an amount depends on exactly what you're
after and whether you're trying to get.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________




More information about the Python-list mailing list