From e0bc0271f61c8f7fcebe69811526f93f88d18ec9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:39:13 +0200 Subject: [PATCH] Ensure Samba client allows SMBv1 when required --- .templates/00-smb_mounts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index 205600a66..b4a161b18 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -280,6 +280,15 @@ if bashio::config.has_value 'networkdisks'; then fi fi + # Ensure the Samba client allows SMBv1 when those options are required + if [[ "${SMBVERS}${SMBVERS_FORCE}" == *"vers=1.0"* ]]; then + if [[ -f /etc/samba/smb.conf ]]; then + bashio::log.warning "...... enabling SMBv1 support in Samba client configuration" + sed -i '/\[global\]/!b;n;/client min protocol = NT1/!a\ + client min protocol = NT1' /etc/samba/smb.conf + fi + fi + # Test with different security versions ####################################### for SECVERS in "$SECVERS" ",sec=ntlmv2" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=krb5i" ",sec=krb5" ",sec=ntlm" ",sec=ntlmv2i"; do