Linux File Sharing (using samba)

From Official Kodi Wiki
Revision as of 22:18, 28 June 2006 by >Demitrix
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Samba is a group of Linux programs designed to be able to interact with windows default file sharing protocol SMB. The samba package offers a service which can be used to share media on a linux based machine to both XBMC and your home Windows PC easily. This article assumes some basic knowledge of the linux environment. All elements are done from a command line as it reduces confusion.

Installing Samba

Due to the diversity of linux distros only two methods will be covered in this article the standard linux install and one using Gentoo's emerge package manager.

  • Installing Samba regardless of distro
  1. wget
  2. tar -xvf samba-latest.tar.gz
  3. cd samba-{version} (At this time its samba-3.0.22)
  4. ./configure
  5. make install
  • Installing Samba using Gentoo's emerge
  1. emerge samba

Configuring Samba shares

Note: Currently only the config for a public share will be posted.

Samba's configuration is stored /etc/samba/smb.conf. All the following items should be placed in that file.

  • Global configuration
   workgroup = <workgroup>
   netbios name = <name of server>
   server string = <title>
   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
Should be set to the workgroup your home pc uses if you planning on accessing this share from a windows PC
netbios name
This is the name that will be displayed when browsing the your Network Neighborhood
server string
The title of the server that will be displayed in windows(This is not the share name)

  • Share configuration
   path = <dir to share>
   public = yes
   only guest = yes
   writable = yes
Set this to the path to be shared by samba