Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-09-04 19:19:14 +0300
committernachoparker <nacho@ownyourbits.com>2017-09-04 19:19:14 +0300
commit4074edaa11742b0020c0d0763f72472cac4886d3 (patch)
treeb65e4ef4cba00929b0880ead73aca3c2ccfbafa1
parent6a2dd48addd55bffe9da5f9d287a12836ea212e3 (diff)
samba: disable SMB1v0.26.7
-rw-r--r--etc/nextcloudpi-config.d/samba.sh3
-rwxr-xr-xupdate.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/etc/nextcloudpi-config.d/samba.sh b/etc/nextcloudpi-config.d/samba.sh
index 8e7bd730..e8dc0256 100644
--- a/etc/nextcloudpi-config.d/samba.sh
+++ b/etc/nextcloudpi-config.d/samba.sh
@@ -27,6 +27,9 @@ install()
# the directory needs to be recreated if we are using nc-ramlogs
grep -q mkdir /etc/init.d/smbd || sed -i "/\<start)/amkdir -p /var/log/samba" /etc/init.d/smbd
+
+ # disable SMB1 and SMB2
+ grep -q SMB3 /etc/samba/smb.conf || sed -i '/\[global\]/aprotocol = SMB3' /etc/samba/smb.conf
}
show_info()
diff --git a/update.sh b/update.sh
index 0aca4fdd..0fd3460a 100755
--- a/update.sh
+++ b/update.sh
@@ -111,6 +111,9 @@ EOF
# remove default config file in stretch
rm -f /etc/apt/apt.conf.d/20auto-upgrades
+ # disable SMB1 and SMB2
+ grep -q SMB3 /etc/samba/smb.conf || sed -i '/\[global\]/aprotocol = SMB3' /etc/samba/smb.conf
+
# restart PHP to get updates in the ncp-web
# FIXME: php doesn't come up if run from ncp-web
#(