User Tools

Site Tools


software:samba

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

software:samba [2019/05/31 15:16] (current)
Michele Porelli created
Line 1: Line 1:
 +====== Samba ======
 +===== How-to =====
 +==== Use Samba as Apple time machine ====
 +/etc/samba/smb.conf
 +<code>[global]
 +# Basic Samba configuration
 +server role = standalone server
 +passdb backend = tdbsam
 +obey pam restrictions = yes
 +security = user
 +printcap name = /dev/null
 +load printers = no
 +socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288
 +server string = Samba Server %v
 +map to guest = bad user
 +dns proxy = no
 +wide links = yes
 +follow symlinks = yes
 +unix extensions = no
 +acl allow execute always = yes
 +log file = /var/log/samba/%m.log
 +max log size = 1000
 +guest ok = no
 +read only = no
  
 +valid users = @shareaccess
 +# username map = /etc/samba/users.map
 +passdb backend = tdbsam:/etc/samba/passdb.tdb
 +
 +# Security
 +client ipc max protocol = default
 +client max protocol = default
 +server max protocol = SMB3
 +
 +client ipc min protocol = default
 +client min protocol = CORE
 +server min protocol = SMB2
 +
 +# Special configuration for Apple's Time Machine
 +# fruit:model = Laptop
 +fruit:model = RackMac
 +fruit:advertise_fullsync = true
 +fruit:aapl = yes
 +
 +## Definde your shares here
 +[TimeMachine Home]
 +path = /mnt/share/%U
 +valid users = %U
 +writable = yes
 +durable handles = yes
 +kernel oplocks = no
 +kernel share modes = no
 +posix locking = no
 +vfs objects = catia fruit streams_xattr
 +ea support = yes
 +browseable = yes
 +read only = No
 +inherit acls = yes
 +fruit:time machine = yes
 +spotlight = yes</code>
 +
 +/etc/avahi/services/timemachine.service<code>
 +<?xml version="1.0" standalone='no'?>
 +<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
 +<service-group>
 + <name replace-wildcards="yes">%h</name>
 + <service>
 +   <type>_smb._tcp</type>
 +   <port>445</port>
 + </service>
 + <service>
 +   <type>_device-info._tcp</type>
 +   <port>0</port>
 +   <txt-record>model=RackMac</txt-record>
 + </service>
 + <service>
 +   <type>_adisk._tcp</type>
 +   <txt-record>sys=waMa=0,adVF=0x100</txt-record>
 +   <txt-record>dk0=adVN=TimeMachine Home,adVF=0x82</txt-record>
 + </service>
 +</service-group></code>
 +
 +  - Create group 'shareaccess' and add users to the group
 +  - Create samba user password:<code>smbpasswd -a michele</code>
software/samba.txt ยท Last modified: 2019/05/31 15:16 by Michele Porelli