3

On Ubuntu, how can I get a list of all windows machines/shares on the network? I tried smbclient, but it only seems to list the shares of a known machine.

1 Answer 1

4

Use smbtree:

marco@hostname:~$ smbtree
Enter marco's password:
NETWORKNAME
    \\HOST_1        hostname
        \\HOST_1\RESOURCE1    comment 
        \\HOST_1\RESOURCE2    comment 
        ...
    .
    .
    .
    \\HOST_N        hostname
        \\HOST_N\RESOURCE1    comment 
        \\HOST_N\RESOURCE2    comment 
        ...
3
  • Please give an example of how smbtree works and possibly simple code to follow. Jan 24, 2011 at 20:24
  • Ok, I'll update my answer but usually smbtree is used without options.
    – marco
    Jan 24, 2011 at 22:02
  • You can use smbtree -N to avoid using password.
    – MestreLion
    Feb 8, 2012 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .