diff --git a/config/functions b/config/functions index 2c533c9e0b..91636f7847 100644 --- a/config/functions +++ b/config/functions @@ -369,15 +369,16 @@ add_user() { echo "$1:x:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd fi - touch ${INSTALL}/usr/config/shadow - ln -sf /storage/.config/shadow ${INSTALL}/etc/shadow + mkdir -p ${INSTALL}/usr/cache + touch ${INSTALL}/usr/cache/shadow + ln -sf /storage/.cache/shadow ${INSTALL}/etc/shadow PASSWORD="$2" if [ "$PASSWORD" = "x" ]; then PASSWORD="*" fi - if ! grep -q "^$1:" ${INSTALL}/usr/config/shadow; then - echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/config/shadow + if ! grep -q "^$1:" ${INSTALL}/usr/cache/shadow; then + echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/cache/shadow fi } diff --git a/packages/sysutils/busybox/package.mk b/packages/sysutils/busybox/package.mk index f5cf42eb36..d20fca7f1e 100644 --- a/packages/sysutils/busybox/package.mk +++ b/packages/sysutils/busybox/package.mk @@ -196,7 +196,7 @@ post_install() { ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 $ROOT_PASSWORD`" echo "chmod 4755 $INSTALL/usr/bin/busybox" >> $FAKEROOT_SCRIPT - echo "chmod 000 $INSTALL/usr/config/shadow" >> $FAKEROOT_SCRIPT + echo "chmod 000 $INSTALL/usr/cache/shadow" >> $FAKEROOT_SCRIPT add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh" add_group root 0 diff --git a/packages/sysutils/systemd/scripts/userconfig-setup b/packages/sysutils/systemd/scripts/userconfig-setup index a2e0f842c1..1f708b3eb0 100755 --- a/packages/sysutils/systemd/scripts/userconfig-setup +++ b/packages/sysutils/systemd/scripts/userconfig-setup @@ -1,7 +1,7 @@ #!/bin/sh ################################################################################ -# This file is part of LibreELEC - http://www.libreelec.tv -# Copyright (C) 2017 Team LibreELEC +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2017-present Team LibreELEC # # LibreELEC is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,5 +24,3 @@ done # Copy config files, but don't overwrite - this should replace our sample files false | cp -iRp /usr/config/* /storage/.config/ &>/dev/null - -[ -f /storage/.config/shadow ] && chmod 000 /storage/.config/shadow || true