mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
trying to set hshed password null on pass change
This commit is contained in:
parent
605a4058a2
commit
7736e8c1d5
@ -210,13 +210,14 @@ elif [ "${abcd}" = "b" ]; then
|
||||
echo "# changing RTL password"
|
||||
cp /home/admin/RTL/RTL-Config.json /home/admin/RTL/backup-RTL-Config.json
|
||||
# remove hashed old password
|
||||
sed -i "/\b\(multiPassHashed\)\b/d" ./RTL-Config.json
|
||||
#sed -i "/\b\(multiPassHashed\)\b/d" ./RTL-Config.json
|
||||
# set new password
|
||||
chmod 600 /home/admin/RTL/RTL-Config.json || exit 1
|
||||
node > /home/admin/RTL/RTL-Config.json <<EOF
|
||||
//Read data
|
||||
var data = require('/home/admin/RTL/backup-RTL-Config.json');
|
||||
//Manipulate data
|
||||
data.multiPassHashed = null;
|
||||
data.multiPass = '$newPassword';
|
||||
//Output data
|
||||
console.log(JSON.stringify(data, null, 2));
|
||||
|
Loading…
x
Reference in New Issue
Block a user