smbclient is the command that we want to use for testing

First get the share names with (I use -N to omit the password, most often you dont need a password to list the shares with samba)

NOTE: we see a share called all-data

NOTE: we use -N which means use “no password”, in otherwords a blank password. Otherwise without -N it would ask for a password and we would hit enter to simulate no password. This passwordless entry only works for guest mode / anonymous access. If you do need username / password access you would not use -N. Instead you would use -U to specify the user (or username & domain at the same time DOMAIN\USER or USER@DOMAIN.com). In this case I have a very simply samba config that allows anonymous access so I use -N.

Then test listing the contents of the share with ls

Try listing contents of a folder in a share:

NOTE: to list the insides of a directory you have to suffix with /*

Now test getting the permission of a file or a folder

NOTE: I ommited that warning/error prefix message on this output, and the next output as well

Now testĀ getting/downloading a file

NOTE: notice I downloaded a file call someapp1 from folder archive in the share all-data off the samba server 10.39.2.11, to a /root folder locally on this machine (where im running the smbclient command). I called the file someapp2.exe. This even lists the speed of download.

The End

Leave a Reply

Your email address will not be published. Required fields are marked *