add samba share for music on nas
This commit is contained in:
parent
e8983829ed
commit
82aeeb585d
5 changed files with 139 additions and 0 deletions
39
bundles/samba/files/smb.conf
Normal file
39
bundles/samba/files/smb.conf
Normal file
|
@ -0,0 +1,39 @@
|
|||
[global]
|
||||
workgroup = KUNBOX
|
||||
server string = ${node.name} samba
|
||||
dns proxy = no
|
||||
max log size = 1000
|
||||
syslog = 1
|
||||
syslog only = 1
|
||||
panic action = /usr/share/samba/panic-action %d
|
||||
encrypt passwords = true
|
||||
passdb backend = tdbsam
|
||||
obey pam restrictions = yes
|
||||
map to guest = bad user
|
||||
load printers = no
|
||||
usershare allow guests = yes
|
||||
allow insecure wide links = yes
|
||||
% for name, opts in sorted(node.metadata.get('samba/shares', {}).items()):
|
||||
|
||||
[${name}]
|
||||
browseable = yes
|
||||
comment = ${opts.get('comment', f'share of {opts["path"]}')}
|
||||
fake oplocks = yes
|
||||
force group = ${opts.get('force_group', 'nobody')}
|
||||
force user = ${opts.get('force_user', 'nogroup')}
|
||||
% if opts.get('guest_ok', True):
|
||||
guest ok = yes
|
||||
% else:
|
||||
guest ok = no
|
||||
% endif
|
||||
locking = no
|
||||
path = ${opts['path']}
|
||||
printable = no
|
||||
read only = no
|
||||
vfs objects = catia fruit
|
||||
writable = ${'yes' if opts.get('writable', False) else 'no'}
|
||||
% if opts.get('follow_symlinks', True):
|
||||
follow symlinks = yes
|
||||
wide links = yes
|
||||
% endif
|
||||
% endfor
|
Loading…
Add table
Add a link
Reference in a new issue