Tuesday, February 19, 2013

Samba configuration on Raspbmc 1.0

Now that I installed version 1.0 of Raspbmc, a donation-based Debian Wheezy / XBMC OS for the Raspberry Pi. I needed to set up my services again, i.e. Samba, Zero Configuration, iTunes server, Apple networking and time machine. Samba took me a little bit mainly because there is so much confusing information on the 'net. So here is my brain dump on how to get Samba 3.6.6 configured:

/etc/samba/smb.conf:


----------------------- Network Related Options -------------------------
[global]
workgroup = SVENHOME
server string = %h Samba Server Version %v
netbios name = PI
usershare allow guests = yes

# --------------------------- Logging Options -----------------------------
log file = /var/log/samba/log.%m
max log size = 50
syslog = 0

# ----------------------- Standalone Server Options ------------------------
security = user
passdb backend = tdbsam
username map = /etc/samba/smbusers
encrypt passwords = yes
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n$
map to guest = bad user
follow symlinks = yes
wide links = yes
unix extensions = no
lock directory = /var/cache/samba

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
   name resolve order = hosts wins bcast

[devices]
    browsable = yes
    read only = yes
    guest ok = yes
    path = /media
    force user = root

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   create mask = 0700
   directory mask = 0700

[music]
   path = /media/Iomega_HDD/music
   force user = pi
   comment = Music
   browseable = yes
   writeable = yes
   create mask = 0777
   directory mask = 0777
   fstype=NTFS
   public=yes

[pictures]
   path = /media/Iomega_HDD/pictures
   force user = pi
   comment = Pictures
   browseable = yes
   writeable = yes
   create mask = 0777
   directory mask = 0777
   fstype=NTFS
   public=yes
 
Add pi to the samba users:
sudo smbpasswd -a pi
sudo smbpasswd -e pi
sudo smbpasswd -e pi
And log on from Windows 8 as SVENHOME\pi and ditto from my laptop running Ubuntu 12.04 LTS without a hitch.

No comments: