De um host Linux, eu instalaria o pacote smbclient
e usaria /usr/bin/smbclient
para listar os compartilhamentos
de man smbclient
-L|--list
This option allows you to look at what services are available on a server.
You use it as smbclient -L host and a list should appear.
The -I option may be useful if your NetBIOS names don't match
your TCP/IP DNS host names or if you are trying to reach a
host on another network.
$ /usr/bin/smbclient --help | grep -A1 list
-L, --list=HOST Get a list of shares available on
a host
$
Alguns compartilhamentos podem exigir autenticação.
Exemplo:
$ /usr/bin/smbclient --user 'MYDOMAIN\account' --list 192.168.123.20
Enter MYDOMAIN\account's password:
Domain=[MYDOMAIN] OS=[Windows 7 Enterprise 7601 Service Pack 1] Server=[Windows 7 Enterprise 6.1]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
NetBIOS over TCP disabled -- no workgroup available
$