From b3c535f3ef53c57018b7c14ecd4ae59da6fe2b58 Mon Sep 17 00:00:00 2001 From: Zeki Ahmet Bayar Date: Wed, 17 Nov 2021 15:02:11 +0000 Subject: [PATCH 1/3] added kerberos support configuration --- src/usr/local/bin/smb-create-domain | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/usr/local/bin/smb-create-domain b/src/usr/local/bin/smb-create-domain index b38d5fa..9e0dd89 100644 --- a/src/usr/local/bin/smb-create-domain +++ b/src/usr/local/bin/smb-create-domain @@ -90,6 +90,11 @@ else fi # Edit Configurations + +if ! grep -q "ldap server require strong auth" /etc/samba/smb.conf ; then + sed -i '/^\[sysvol\].*/i ldap server require strong auth = allow_sasl_over_tls ' /etc/samba/smb.conf +fi + if ! grep -q "template shell" /etc/samba/smb.conf ; then sed -i '/^\[sysvol\].*/i template shell = /bin/bash ' /etc/samba/smb.conf fi From 9b21b1f3229b8a88e4dfd867e89de07c57299c47 Mon Sep 17 00:00:00 2001 From: Zeki Ahmet Bayar Date: Wed, 17 Nov 2021 15:12:44 +0000 Subject: [PATCH 2/3] reverse parameter fix --- src/usr/local/bin/smb-create-domain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr/local/bin/smb-create-domain b/src/usr/local/bin/smb-create-domain index 9e0dd89..a32aed6 100644 --- a/src/usr/local/bin/smb-create-domain +++ b/src/usr/local/bin/smb-create-domain @@ -148,7 +148,7 @@ then # Create reverse zone samba-tool dns zonecreate localhost $REVERSE_ZONE -U administrator --password $ADMIN_PASSWORD # Add revese ip - samba-tool dns add localhost $REVERSE_ZONE $IP PTR $HOSTNAME -U administrator --password $ADMIN_PASSWORD + samba-tool dns add localhost $REVERSE_ZONE $IP PTR "${HOSTNAME,,}.${DOMAINNAME,,}" -U administrator --password $ADMIN_PASSWORD fi From 1f1418513b2860a24275705a40a395f509aee992 Mon Sep 17 00:00:00 2001 From: Zeki Ahmet Bayar Date: Wed, 17 Nov 2021 15:15:04 +0000 Subject: [PATCH 3/3] updated usage function --- src/usr/local/bin/smb-create-domain | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/usr/local/bin/smb-create-domain b/src/usr/local/bin/smb-create-domain index a32aed6..e8cfff3 100644 --- a/src/usr/local/bin/smb-create-domain +++ b/src/usr/local/bin/smb-create-domain @@ -7,9 +7,10 @@ USAGE() { echo " "; echo "smb-create-domain [options]"; echo "options:"; - echo "-h, --help show brief help"; - echo "-d, --domain \"ORNEK.COM\" specify the name of new domain"; - echo "-r, --reverse \"192.168.1.5\" specify the ip address of domain to create reverse zone";} + echo "-h, show brief help"; + echo "-d, \"ORNEK.COM\" specify the name of new domain"; + echo "-p, \"Passw0rd\" specify the password of new domain"; + echo "-r, \"192.168.1.5\" specify the ip address of domain to create reverse zone";} # Get parameters if [ -z "$1" ] ; then