which Linux command allows to browse all available smb shares in the network?

10

4

I want to browse all available smb shares in the network, like clicking the "network" in nautilus then all shares are shown, using command line

the closest one I got is smbclient -L SRVNAME, which lists all shares in SRVNAME as well as all other servers in the workgroup and other workgroups available, but it requires me knowing at least the correct SRVNAME

zhanwu

Posted 2010-12-31T07:17:11.597

Reputation: 853

Answers

11

Use smbtree command to see all the clients & shared folders in a tree fashion.

ismail

Posted 2010-12-31T07:17:11.597

Reputation: 507

Something wrong with the command. While dolphin shows really a lot of smb directories, smbtree only shows a single, which is also local. – Hi-Angel – 2015-10-23T14:49:47.100

2

I use findsmb It works similar to smbtree.

  • smbtree will show you a list of all available workgroups and clients under those work groups.

$smbtree
Enter usernames's password:

WORKGROUP1
    \\host1         
        \\host1\ADMIN$          IPC Service (SMB Server)
        \\host1\IPC$            IPC Service (SMB Server)
        \\host1\print$          
        \\host1\print           Printer
    \\host2                 
        \\host2\C$              Default share
        \\host2\ADMIN$          Remote Admin
        \\host2\Z$              Default share
WORKGROUP2
  • smbfind will show you a list of all client that are advertising them selves as available.

$findsmb

                            *=DMB
                            +=LMB            

IP ADDR | NETBIOS NAME | WORKGROUP/OS/VERSION

192.168.1.1 DOMAINHOST *[DOMAIN] [Windows 5.0] [Windows 2000 LAN Manager]

nelaaro

Posted 2010-12-31T07:17:11.597

Reputation: 9 321