Samba Sharing in XBMCbuntu

Samba is not included with XBMCbuntu (at least in 11.10), so first we have to install it:
sudo apt-get install samba
Open Samba’s configuration file in an editor
sudo nano /etc/samba/smb.conf
Scroll down to the bottom of the file and add the following sections, which will create a public share with read/write access without password validation:

workgroup = Workgroup
netbios name = XBMC
server string = XBMC Server
log file = /var/log/samba/log.%m
max log size = 50
map to guest = bad user
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
dns proxy = no

path = /media
public = yes
only guest = yes
writable = yes
force user = xbmc

The above configuration example shares everything under the /media directory in a folder called “public”. The “force user” property must be set to a user with write access to the directory being shared. All files and directories will appear to have been created by this user.
Run “testparm” to check if your Samba configuration is parseable. For configuration changes to take effect, the Samba daemon can be restarted with
sudo /etc/init.d/smbd restart
The following screenshot shows my XBMC box sharing the /media directory which contains mount points for two harddrives (ingeniously named according to their capacities…):

4 thoughts on “Samba Sharing in XBMCbuntu

  1. Thanks! I can’t understand… I’ve installed XBMCbuntu 32bits… The sistem can’t get Samba installed…
    What can I do?

  2. Hi!
    Thanks for the reply…
    I’ve installed the XBMCbuntu again, and I’ve installed Samba…
    After that I see the share but I can’t write to the folder. I’ve set CHMOD 777 “media” and now can write in to the folder.

    I’ve now another problem. My PC have 2 HDs, one of 80GB to install the OS, and the second of 2TB to Music, Videos, etc… I’m not a Linux guy, I can’t understand the steps to partition the drive and to mount the drive… and after that access the shared folder in to the data from the LAN.

    My idea is to share the 2TB HD, and acess in to it from the XBMC and from the LAN. For me is the best way if I need to format again and don’t loose data.


    Excuse-me for the bad English, but I’m Portuguese!

  3. I think I’ve solved the problem… I’ve tested with a virtual machine, tomorrow i’ll make a physical installation again.

    Many thanks!