mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-21 06:49:13 +02:00
Test for logon_failure
This commit is contained in:
@@ -109,8 +109,13 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Are credentials correct
|
# Are credentials correct
|
||||||
echo "... testing credentials"
|
echo "... testing credentials"
|
||||||
if ! smbclient -t 2 -L "$disk" -U "$USERNAME%$PASSWORD" "$DOMAINCLIENT" &>/dev/null; then
|
if ! smbclient -t 2 -L "$disk" -U "$USERNAME%$PASSWORD" "$DOMAINCLIENT" &>/output; then
|
||||||
bashio::log.fatal "Incorrect Username, Password, or share path ! Script will stop."
|
if [[ "$(cat /output)" == *"LOGON_FAILURE"* ]]; then
|
||||||
|
bashio::log.fatal "Incorrect Username, Password, or Domain! Script will stop."
|
||||||
|
else
|
||||||
|
bashio::log.fatal "Incorrect path? Error : $(cat /output). Script will stop."
|
||||||
|
fi
|
||||||
|
rm /output
|
||||||
touch ERRORCODE
|
touch ERRORCODE
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user