install.fairie/home/dot_config/samba/config.tmpl

107 lines
3.2 KiB
Cheetah
Raw Normal View History

2023-04-11 01:04:22 -07:00
[global]
# Allow connections with hostnames that can be resolved from hostname.local.{{ .user.domain }}
allow hosts = .local.{{ .user.domain }}
hostname lookups = yes
# Allows users without accounts to log in and be assigned to the guest account
map to guest = bad user
netbios name = {{ .host.samba.netbiosName }}
obey pam restrictions = yes
proxy = no
# Allow using DNS to specify allowed hosts
# Source: https://serverfault.com/questions/702455/samba-hosts-allow-example-com
dns proxy = yes
2024-01-12 23:47:07 -08:00
# Required for macOS JuiceFS Samba
ea support = yes
passdb backend = tdbsam
2023-04-11 01:04:22 -07:00
security = user
server role = standalone server
server string = Samba on %L
workgroup = {{ .host.samba.workgroup }}
# Printing - Uncomment these lines to enable Samba printer sharing with CUPSD
# Source: https://wiki.archlinux.org/index.php/CUPS/Printer_sharing
# load printers = yes
# printing = CUPS
# Symlinks - Uncomment the following two options to enable symlinking (including symlinks outside of the shared folder)
# This feature is disabled by default due to security concerns (i.e. people can create symlinks on the shares and access system files if the share is writable)
# unix extension = no
# wide links = yes
2024-01-12 23:47:07 -08:00
[default]
### Source: https://gist.github.com/jbfriedrich/49b186473486ac72c4fe194af01288be
# Use NTFS streams if supported
streams = yes
# Soft mount by default
soft = yes
# Disable signing due to macOS bug
signing_required = no
# Disable directory caching
dir_cache_off = yes
# Lock negotiation to SMB2/3 only
# 7 == 0111 SMB 1/2/3 should be enabled
# 6 == 0110 SMB 2/3 should be enabled
# 4 == 0100 SMB 3 should be enabled
protocol_vers_map = 6
# No SMB1, so we disable NetBIOS
port445 = no_netbios
# Turn off notifications
notify_off = yes
# SMB Multichannel behavior
# To disable multichannel support completely uncomment the next line
# mc_on=no
# Some Wi-Fi networks advertise faster speeds than the connected wired network.
mc_prefer_wired = yes
2023-04-11 01:04:22 -07:00
[Private]
browsable = yes
comment = Authenticated share with read/write capabilities (backed up to S3)
follow symlinks = yes
2023-04-11 01:04:22 -07:00
guest only = no
2024-01-12 23:47:07 -08:00
path = /mnt/private
2023-04-11 01:04:22 -07:00
public = no
unix extension = yes
2023-04-11 01:04:22 -07:00
valid users = @sambausers
wide links = yes
2023-04-11 01:04:22 -07:00
writable = true
[Public]
browsable = yes
comment = Public folder provided for file sharing on the LAN (backed up to S3)
follow symlinks = no
guest only = yes
2024-01-12 23:47:07 -08:00
path = /mnt/public
2023-07-16 03:10:04 -07:00
public = yes
writable = yes
[User]
browsable = yes
comment = Public user home directory folder for file sharing on the LAN
follow symlinks = no
guest only = yes
path = /home/{{ .user.name }}/Public
2023-04-11 01:04:22 -07:00
public = yes
writable = yes
# [printers]
# browsable = yes
# comment = Printers
# path = /var/spool/samba/
# printable = yes
# public = yes
# writable = no
# [print]
# browsable = yes
# comment = Printer drivers
# path = /var/lib/samba/printers
# public = yes
# writable = no
# [HPOfficeJetPro]
# comment = HP OfficeJet Pro printer
# path = /var/spool/samba/
# printable = yes
# # Source: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server
# printer name = HP OfficeJet Pro 6978
# public = yes
# writable = no