diff --git a/config/functions b/config/functions index a909cb6d67..32e83460c2 100644 --- a/config/functions +++ b/config/functions @@ -1480,6 +1480,8 @@ add_user() { PASSWORD="$2" if [ "$PASSWORD" = "x" ]; then PASSWORD="*" + else + PASSWORD=$(python -c "import crypt; print(crypt.crypt('$PASSWORD', crypt.mksalt(crypt.METHOD_SHA512)))") fi if ! grep -q "^$1:" ${INSTALL}/usr/cache/shadow; then echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/cache/shadow diff --git a/packages/sysutils/busybox/package.mk b/packages/sysutils/busybox/package.mk index a1497d7e98..5bdc5e40d8 100644 --- a/packages/sysutils/busybox/package.mk +++ b/packages/sysutils/busybox/package.mk @@ -180,12 +180,10 @@ makeinstall_target() { } 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/cache/shadow" >> ${FAKEROOT_SCRIPT} - add_user root "${ROOT_PWD}" 0 0 "Root User" "/storage" "/bin/sh" + add_user root "${ROOT_PASSWORD}" 0 0 "Root User" "/storage" "/bin/sh" add_group root 0 add_group users 100