mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
Merge pull request #5453 from antonlacon/le11-passwd
buildsystem: cleanup password hashing; drop busybox:host
This commit is contained in:
@@ -1496,6 +1496,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
|
||||
|
||||
Reference in New Issue
Block a user