To setup SMB sharing in XBMCbuntu and other flavours of ubuntu follow the guide below :
In this example my home directory is /home/xbmc/
SSH to your media server.
sudo apt-get install samba
Press Y when prompted.
Im going to make all my shares need a username and password. So first of all we need to create a user. Im going to stick with xvmc and xbmc as the password to make it easier.
To make a user do the command
sudo smbpasswd -a xbmc
Type in the password you want to set.
Now we need to create our shares.
sudo nano /etc/samba/smb.conf
Scroll all the way to the bottom of this file and type the following.
[Movies] comment = Movies Folder path = /home/xbmc/Movies browsable = yes write list = xbmc inherit permissions = yes
This creates a share for the Movies folder in my home directory. Obviously that folder needs to exist. This folder will have write access for the user xbmc.
All you need to do then is repeat this process for every share you want to create. Below is another example.
[TV] comment = TV Shows path = /home/xbmc/TV Shows/ browsable = yes write list = xbmc inherit permissions = yes
Once happy press CTRL + X and then press Y to save. Enter to overwrite the file.
Now we just need to give ownership to these folders.
sudo chown xbmc /home/xbmc
Before you can access the shares you either need to reboot the server or run the following command.
sudo service smbd restart