Samba used to be the unix sysadmin's living nightmare. That's all changed!
Sharing folders across the network from one Ubuntu machine to another, or to and from Windows machines, is really easy.
Here's how you do it... This works on Ubuntu Intrepid and later
Right-mouse on the folder and click sharing options...
tick share this folder
Now, the very first time you do this, it will say you need to install the Windows networks sharing service.Back to the story...
Click "install service"
Tick the box to over-ride PAM settings (even though it's not at all obvious what that all means)
Then you need to restart your session (log out and log back in again).
You also need to (once only) set your samba password on the machine where the folder lives
At a command prompt typesudo smbpasswd -a your_user_nameNow put in your password to get sudo privileges
Now put in the password you want to use for network access to your folders (probably not the same as your normal password, but that's up to you!)
If you want to grant write access as well as read-only access, also tick the next box
You'll also need to know the IP address or dns name of this machine
ifconfig or System -> Administration -> Network Tools and select the Network device through which you are connected and read off the IP address
Enter the samba password that you previously set, when prompted
If you have trouble connecting, make sure the firewall on the remote system isn't blocking you.
sudo service iptables stopremoves all the firewall rules, but will at least allow you to eliminate that from the diagnosis!
From the explorer for the remote system, go into one of the shared directories and copy what you want to an explorer window on the local system.
Note you can't drag a shared folder to copy it and its contents - it says "not a directory".
So you have to open it, select all (ctrl-A), then drag into the new folder.
And there you go!
To stop sharing a folder, right-mouse Sharing Options - untick the share box.
If you know your hostname and share name, you can directly access the samba share from the Nautilus location bar with:
sudo service iptables start