From 05fd2d4e20a3f878cb17430076bd39ff6d214341 Mon Sep 17 00:00:00 2001 From: openhabian Date: Tue, 14 Nov 2023 23:37:10 +0100 Subject: [PATCH] UI admin user Passwort setzen Signed-off-by: openhabian --- functions/storm.house.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/storm.house.bash b/functions/storm.house.bash index b2a004193..2f5ae7e72 100644 --- a/functions/storm.house.bash +++ b/functions/storm.house.bash @@ -449,6 +449,7 @@ install_extras() { local dest="/usr/share/openhab/addons/${jar}" local sudoersFile="011_ems" local sudoersPath="/etc/sudoers.d" + local passwdCommand="/usr/bin/ssh -p 8101 -o StrictHostKeyChecking=no -i /var/lib/openhab/etc/openhab_rsa openhab@localhost user changePassword admin ${userpw:-1mart!house}" if [[ ! -f /usr/local/sbin/upgrade_ems && $(whoami) == "root" ]]; then @@ -466,6 +467,9 @@ install_extras() { cond_redirect chown "${username:-openhabian}:openhab" "${OPENHAB_USERDATA:-/var/lib/openhab}/etc/openhab_rsa*" cond_redirect install -m 640 "${includesDir}/generic/ems.key" $deckey + # shellcheck disable=SC2046 + cond_redirect $(${passwdCommand}) + # lc if ! cond_redirect install -m 644 -t "${serviceTargetDir}" "${includesDir}"/generic/lc.timer; then rm -f "$serviceTargetDir"/lc.{service,timer}; echo "FAILED (setup lc)"; return 1; fi if ! cond_redirect install -m 644 -t "${serviceTargetDir}" "${includesDir}"/generic/lc.service; then rm -f "$serviceTargetDir"/lc.{service,timer}; echo "FAILED (setup lc)"; return 1; fi