Files
salt-states/samba/smbd.sls
2025-05-05 01:08:19 -04:00

28 lines
652 B
Plaintext

samba_packages:
pkg.installed:
- pkgs:
- samba
- samba-common-bin
smbd:
service.running:
- enable: True
- watch:
- file: /etc/samba/smb.conf
- pkg: samba_packages
/etc/samba/smb.conf:
file.managed:
- source: 'salt://samba/files/smb.conf.jinja'
- template: jinja
- check_cmd: /usr/bin/testparm -d 0 -s
#{# generate these with print(hashlib.new('md4', "password".encode('utf-16le')).hexdigest()) #}
#{% for user, passw in salt.pillar.get('samba:users', {}).items() %}
#samba_{{user}}:
# pdbedit.managed:
# - name: {{user}}
# - password: {{passw}}
# - password_hashed: True
#{% endfor %}