smbclient is samba client with an “ftp like” interface. It is a useful tool to test connectivity to a Windows share. It can be used to transfer files, or to look at share names. In addition, it has a nifty ability to ‘tar’ (backup) and restore files from a server to a client and visa versa.
In the case of the service name, this would be the conventional means of “mapping” a service in the Windows environment using the “net” command:
c:\net use P: \some--Windows-server\some-share-name
But in the linux shell, the ‘\’ has special meaning. Thus, there are couples means of “getting around this”.
I mostly use the double the number of ‘\’ method as in:
smbclient \\connect-the-machine\some-share -U userid
One means of finding out what the shares on the host machine are is by using the -L switch.
parashar@kali:~$ smbclient -N -L ///10.10.10.27
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
Disk Default share
IPC$ IPC Remote IPCSMB1 disabled -- no workgroup available
The following link is to a post on samba.org which goes into great details on different switches that can be employed.