Very few articles on Samba tell you how to do anything simple with it quickly, and this can be very frustrating to the new user.

Let's assume you are running linux on a workstation on a LAN with a bunch of windows machines, and you want to access the files in network neighborhood. Most distributions of linux come with samba installed but you have no idea how to use it.

The following command:

smbclient -L fred -U jim%mypassword

Will attempt to get a list of disk and print shares on the machine "fred." In the above command, "-L" stands for "list", and "-U" for "user." The -U option allows you to specify which username and password to use. You don't even need to have /etc/smb.conf on your system for this to work, let alone have smbd or nmbd running (the 2 Samba protocol daemons that allow you to serve disk shares to others on the network).

The next most interesting command is this:

smbclient //fred/dir1 -U jim%mypassword

This attempts to make a connection to the disk share dir1 on machine fred for user jim with password "mypassword." If it works, you will be sitting at a command prompt from which ftp like commands work (including "ls", "get file", and "put file").

Again, this works without even having the smb.conf file anywhere on your system, let alone properly configured.