SMBCrawler is a command-line utility for listing workgroups, servers, and shares. It also can recursively list files located on a Samba server.