computer names and samba shares

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Jun 16 05:42:20 EDT 2004


| Let's try a bit better: we have a Samba server and a local 
| net: netmask 255.255.255.0 on 192.168.0.x (no proxies or so 
| between me and this net). We do not have LDAP, yellow pages 
| etc. though there is a DNS server. Network addresses are 
| static (for now).
| 
| I don't know what ADSI is, we do not use LDAP.

ADSI is (in essence) Windows' answer to LDAP.
If your Samba / Windows network were set up
to use Active Directory (AD), you could use an LDAP
client to query AD from any machine, Windows, Linux,
or anything else. If it doesn't (and it doesn't need
to) you're down to other methods.

If you want specific code to run from Windows
boxes, I'm quite happy to supply various alternatives.
On the Samba front, I'm afraid, you'll have to
Google / ask around.

| I was hoping to find a platform-independent solution in 
| Python, because some machines in the company use GNU/Linux, 
| which means win32net is of limited use.

Understood. I can come up with several solutions using
several Windows-only approaches. Without that, though,
I think you need to ask some Samba experts about Samba
tools.

In particular, I think that "smbclient -L <host>" will
show the shares on any Samba-like box (Linux or Win32).
And the "NET VIEW <host>" will do the same from any
Win32 box. "NET VIEW" is one of a set of command-line
tools on Win32 boxes which you run from the command
prompt. "NET VIEW" on its own will list all machines
known to the machine you're on. With a host name, it
will list visible shares on that host.

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