In Ubuntu, you can use the SMB protocol (Server Message Block), a.k.a ‘Samba’, to share folders from your Ubuntu Linux workstation with Microsoft Windows workstations on your network.
I use SMB to share folders between my Ubuntu workstation and my Windows XP virtual machine in VMWare Server. Note that other virtualization products, such as VMWare Workstation and VirtualBox, come with this feature built-in.
In my virtual machine, I have the ethernet card set to ‘Bridged’ so that it connects to my physical network and is assigned an IP address from my router, as opposed to sharing the IP address from the Ubuntu host using NAT. You will need to know the Workgroup that the Windows XP machine is in. You can find this by going to Control Panel -> System and clicking on the Computer Name tab. You will see the Workgroup identified there.
Now, in Ubuntu, click System -> Administration -> Shared Folders. This will prompt you for your sudo password. If this is your first time visiting this control panel, it may prompt you to install SMB and NFS support, which you should do. Once that is finished, you will be presented with the Shared Folders applet. Click Add, choose the Path to the folder you want to share, choose ‘Windows networks (SMB)’, and enter the user name that you want to allow access to this share. You can also specify whether the user will have read-only access or read-write access. Click OK.
You are now sharing a folder. However, if you try to access the folder from Microsoft Windows at this point, you will be prompted for your password over and over again. The documentation in Ubuntu fails to tell you that you need to configure the user name that you want to use to access the share. The default configuration requires users to enter a user name and password to access the share. You can do this from the command line:
$ sudo smbpasswd -a <USERNAME>
Replace <USERNAME> with the user name you want to access the shares. That command will respond with:
New SMB password:
Type the password you want to use, then confirm it. You should now be able to access the share via Windows with that user name and password.