From 1b1ea79fca330f454dff7f3a4aeeff703fcbdfb6 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 25 Sep 2025 11:56:41 +0200 Subject: [PATCH] Refactor SMBv1 connection handling in script --- .templates/00-smb_mounts.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index b4a161b18..819367499 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -217,16 +217,10 @@ if bashio::config.has_value 'networkdisks'; then fi continue elif echo "$OUTPUT" | grep -q "tree connect failed" || echo "$OUTPUT" | grep -q "NT_STATUS_CONNECTION_DISCONNECTED"; then - echo "... testing path" - if smbclient -t 2 "$disk" -m NT1 -U "$USERNAME%$PASSWORD" -c "exit" $DOMAINCLIENT &> /dev/null; then - bashio::log.warning "...... share reachable only with legacy SMBv1 (NT1) negotiation. Forcing SMBv1 options." - SMBVERS_FORCE=",vers=1.0" - SECVERS_FORCE=",sec=ntlm" - else - bashio::log.fatal "...... invalid or inaccessible SMB path. Script will stop." - touch ERRORCODE - continue - fi + echo "... using SMBv1" + bashio::log.warning "...... share reachable only with legacy SMBv1 (NT1) negotiation. Forcing SMBv1 options." + SMBVERS_FORCE=",vers=1.0" + SECVERS_FORCE=",sec=ntlm" elif ! echo "$OUTPUT" | grep -q "Disk"; then echo "... testing path" bashio::log.fatal "...... no shares found. Invalid or inaccessible SMB path?"