configuration-templates – Rev 183
?pathlinks?
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
## rights of fair usage, the disclaimer and warranty conditions. ##
###########################################################################
## Optimized standalone configuration template for Samba servers. ##
## ##
## Ideal for: ##
## * Virtual machine file sharing ##
## ##
## Requirements: ##
## * Samba 4.x ##
## ##
## File placement layout: ##
## / ##
## `-- etc ##
## `-- samba ##
## |-- smb.conf ##
## |-- smb.conf.local ##
## |-- smb.conf.share ##
## `-- smb.conf.ldap ##
## ##
## Files Description: ##
## * /etc/samba/smb.conf (this file) ##
## * /etc/samba/smb.conf.local (local server-site settings) ##
## * /etc/samba/smb.conf.share (samba shares go here) ##
## * /etc/samba/smb.conf.ldap (optional ldab configuration) ##
## ##
###########################################################################
[global]
bind interfaces only = yes
name resolve order = lmhosts host wins bcast
# Standalone.
local master = no
domain master = no
preferred master = no
security = user
# For compatibility with scripts.
passdb backend = smbpasswd
add user script = /usr/sbin/useradd -d /nonexistent -s /usr/sbin/nologin %u
map to guest = Bad User
guest account = nobody
# Allow some variable expansions to work.
#%M
hostname lookups = yes
#%m
#smb ports = 139
# Extended attributes on files.
ea support = yes
map acl inherit = yes
store dos attributes = yes
# Samba version support (support legacy clients).
min protocol = NT1
# Samba modules.
# vfs objects = shadow_copy2 catia fruit streams_xattr acl_xattr recycle crossrename io_uring aio_pthread
vfs objects = shadow_copy2 catia fruit streams_xattr acl_xattr recycle crossrename aio_pthread
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
shadow: format = zfs-auto-snap_%S-%Y-%m-%d-%H%M
shadow:localtime = no
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
fruit:resource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native
fruit:resource = xattr
fruit:time machine = no
fruit:metadata = stream
fruit:locking = none
fruit:encoding = native
fruit:veto_appledouble = yes
fruit:posix_rename = yes
readdir_attr:aapl_finder_info = yes
readdir_attr:aapl_max_access = yes
readdir_attr:aapl_rsize = yes
streams_xattr:store_stream_type = yes
crossrename:sizelimit = 50
io_uring:num_entries = 128
io_uring:sqpoll = no
aio_linux:aio num events = 256
aio_pthread:aio open = true
### Tweaks
# Don't tweak Linux buffers: SO_RCVBUF=131072 SO_SNDBUF=131072
socket options=TCP_NODELAY IPTOS_LOWDELAY
# No extent-based allocation: ZFS
strict allocate = no
# No sendfile on: ZFS
use sendfile = no
# Requires aio_pthread as last module in vfs_objects
aio read size = 1
aio write size = 1
# Enable raw rights and reads.
read raw = yes
write raw = yes
# Logging
# 0 -> LOG_ERR, 1 -> LOG_WARNING, 2 -> LOG_NOTICE, 3 -> LOG_DEBUG
log level = 1
# Include LDAP configuration.
#include = smb.conf.ldap
# Include DFS.
#include = smb.conf.dfs
# Include local settings.
include = smb.conf.local
# Include shares.
include = smb.conf.share