RE: computer names and samba shares

Discussion in 'Python' started by Tim Golden, Jun 16, 2004.

  1. Tim Golden

    Tim Golden Guest

    | 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
    ________________________________________________________________________
     
    Tim Golden, Jun 16, 2004
    #1
    1. Advertising

  2. Josef Dalcolmo, Jun 16, 2004
    #2
    1. Advertising

  3. 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.

    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.

    Listing computers on a domain was the first part of my question. I would
    be even more interested to find out about the second part: listing Samba
    (Windows) shares on the Samba server (program running on a client machine).

    os.listdir(r'//myserver') doesn't work, because '//myserver' is not a directory. I guess I should look at the Samba docs, but was hoping there is already a library for Python ...

    Best regards - Josef Dalcolmo
     
    Josef Dalcolmo, Jun 16, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Josef Dalcolmo

    computer names and samba shares

    Josef Dalcolmo, Jun 15, 2004, in forum: Python
    Replies:
    0
    Views:
    328
    Josef Dalcolmo
    Jun 15, 2004
  2. I.V. Aprameya Rao

    samba/windows shares

    I.V. Aprameya Rao, Dec 9, 2004, in forum: Python
    Replies:
    1
    Views:
    379
    =?ISO-8859-1?Q?Eino_M=E4kitalo?=
    Dec 10, 2004
  3. I.V. Aprameya Rao

    samba/windows shares

    I.V. Aprameya Rao, Dec 9, 2004, in forum: Python
    Replies:
    0
    Views:
    408
    I.V. Aprameya Rao
    Dec 9, 2004
  4. Michael D. Ober

    ASP.NET 2.0 site accessing Samba 3 shares

    Michael D. Ober, Sep 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    442
    Michael D. Ober
    Sep 28, 2006
  5. BDZ
    Replies:
    5
    Views:
    1,731
Loading...

Share This Page