This article was first written in November 2007 for the BeezNest technical website (http://glasnost.beeznest.org/articles/365).
The easy part is to right-click the directory in GNOME and select “Shared directory…”, enter the sudo password, then select “SMB (Windows client)”  and possibly unselect the “Read only” checkbox.
This will enable the SAMBA sharing of the directory.
Now when connecting from Windows, you will be asked to enter a login and a password, but even if you use correct a login/password pair, you won’t be authorized, because you need to enable the access from the Ubuntu computer, by running smbpasswd username. Once you have done this, you can try accessing the share from Windows again. This time, you have a login and a password that will work.
 This makes the asumption that you have the samba server installed on your computer, otherwise you need to install it from the System > Administration > Synaptic packages manager