Is there a way to change the root and admin passwords through JSON RPC?
I have found some old threads that state that this isn’t possible, but the credentials for the JRPC access seem very high. If i could simple execute this linux command through JRPC that would work:
echo -e "<yourpassword>\n<yourpassword>" | passwd <user>
but i am unsure how i should format the JRPC message in order to get a piped command to be run.
I have also tried sending this command, which I found is used in the startup scripts given in the SDK to initialize the passwords:
set_password() {
local user="$1"
local passwd="$2"
[ -z "$passwd" ] && passwd="$(mkpasswd admin01)"
**sed -i -e "s:^$user\:[^\:]*\::$user\:$passwd\::" /etc/shadow**
}
this does seem to change the password, but i think it may add an additional password.
Is there a recommended way to use sed
to change the password, or is sending piped command like above possible?