#!/bin/sh
[ ! -f /etc/samba/smb.conf ] || grep -q "server role = standalone server" /etc/samba/smb.conf || exit 0
#systemctl stop smbd nmbd winbind
#net ads testjoin
cat >/etc/security/limits.d/samba.conf <<EOF
* - nofile 16384
root - nofile 16384
EOF
sed -E '/^passwd:|group:/s/^(.*)$/\1 winbind/' /etc/nsswitch.conf

