Files
lab-rack/roles/fileserver/templates/smb.conf.template
T

41 lines
1.3 KiB
Plaintext
Raw Normal View History

2026-07-06 16:45:51 +02:00
[global]
workgroup = WORKGROUP
netbios name = {{ inventory_hostname }}
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
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\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
# --- macOS Optimization (Fruit) ---
vfs objects = fruit streams_xattr recycle
fruit:model = MacPro7,1@ECOLOR=226,226,224
fruit:metadata = stream
fruit:veto_appledouble = no
fruit:posix_rename = yes
# --- Recycle Bin Logic ---
recycle:touch = yes
recycle:keeptree = yes
recycle:versions = yes
# Dynamic Shares Loop
{% for share in samba_shares %}
[{{ share.name }}]
path = {{ share.path }}
browseable = {{ share.browseable | default('yes') }}
read only = {{ share.read_only | default('no') }}
guest ok = {{ share.guest_ok | default('yes') }}
{% if share.force_user is defined %}
force user = {{ share.force_user }}
{% endif %}
{% endfor %}