apiVersion: v1
kind: ConfigMap
metadata:
    name: smb.conf
    namespace: storage
data:
    smb.conf: |
        [global]
          workgroup = WORKGROUP
          netbios name = greyhole
          server string = %h server (Samba, Alpine)
          security = user

          map to guest = bad user

          #greyhole needs these
          unix extensions = no
          wide links = yes

          server role = standalone server

          log file = /dev/stdout
          max log size = 50

          dns proxy = no

          pam password change = yes
          create mask = 0664
          force create mode = 0664
          directory mask = 0775
          force directory mode = 0775
          force user = smbuser
          force group = smb
          follow symlinks = yes

          disable spoolss = yes
          strict locking = no
          aio read size = 0
          aio write size = 0
          vfs objects = acl_xattr catia fruit recycle streams_xattr

          recycle:keeptree = yes
          recycle:maxsize = 0
          recycle:repository = .deleted
          recycle:versions = yes

          # Security
          client ipc max protocol = SMB3
          client ipc min protocol = SMB2_10
          client max protocol = SMB3
          client min protocol = SMB2_10
          server max protocol = SMB3
          server min protocol = SMB2_10

          # disable printing services
          load printers = no
          printing = bsd
          printcap name = /dev/null
          disable spoolss = yes

        [Backups]
          path = /mnt/landing_zone/backups
          create mask = 0770
          directory mask = 0770
          read only = no
          available = yes
          browseable = yes
          writable = yes
          guest ok = no
          printable = no
          dfree command = /usr/bin/greyhole-dfree
          vfs objects = greyhole

        [Storage]
          path = /mnt/landing_zone/storage
          create mask = 0770
          directory mask = 0770
          read only = no
          available = yes
          browseable = yes
          writable = yes
          guest ok = no
          printable = no
          dfree command = /usr/bin/greyhole-dfree
          vfs objects = greyhole

        [Unrestricted]
          path = /mnt/landing_zone/unrestricted
          create mask = 0770
          directory mask = 0770
          read only = no
          available = yes
          browseable = yes
          writable = yes
          guest ok = yes
          printable = no
          dfree command = /usr/bin/greyhole-dfree
          vfs objects = greyhole

        [Greyhole Trash]
          path = /mnt/landing_zone/trash
          create mask = 0770
          directory mask = 0770
          read only = no
          available = yes
          browseable = yes
          writable = yes
          guest ok = no
          printable = no
          dfree command = /usr/bin/greyhole-dfree
          vfs objects = greyhole
