Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nthon/1acb583148643b8e61a4a565349e451c to your computer and use it in GitHub Desktop.

Select an option

Save nthon/1acb583148643b8e61a4a565349e451c to your computer and use it in GitHub Desktop.

Revisions

  1. Chloé "Tigre Rouge" Desoutter created this gist Mar 23, 2017.
    14 changes: 14 additions & 0 deletions _etc_avahi_services_samba.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <?xml version="1.0" standalone='no'?>
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
    <type>_adisk._tcp</type>
    <txt-record>sys=waMa=0,adVF=0x100</txt-record>
    <txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
    </service>
    <service>
    <type>_smb._tcp</type>
    <port>445</port>
    </service>
    </service-group>
    44 changes: 44 additions & 0 deletions _etc_samba_smb.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    [global]

    wins support = yes
    workgroup = WORKGROUP
    netbios name = SAMBA
    vfs objects = acl_xattr fruit
    map acl inherit = yes
    store dos attributes = yes
    security = user
    valid users = @shareaccess
    username map = /etc/samba/users.map

    passdb backend = tdbsam:/etc/samba/passdb.tdb
    guest ok = no
    read only = no

    # Time Machine
    durable handles = yes
    kernel oplocks = no
    kernel share modes = no
    posix locking = no
    fruit:advertise_fullsync = true
    smb2 leases = yes

    # 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


    [Time Capsule]

    path = /tank/Backups
    browseable = Yes
    vfs objects = catia fruit streams_xattr
    fruit:aapl = yes
    read only = No
    inherit acls = Yes