I'm looking how to shell script for changing the root password at boot, but no success till now.
I can manage to change it once the first password has been set up but not at the first boot time. (both ways are working: using cgi vapix in a curl request or directly through curl in the shell)
Could anybody give a hint about the right curl request for this please ?
Thx in advance
----------------------------------
Here is what I tried w/o success :
Code: Select all
echo "Changing root default password : "
USER="root"
PASSWORD="new_pwd"
# GET from pwdroot/pwdRoot.shtml
# ="submitdata=action?update&user=$USER&pwd=$PASSWORD&dummy="
# POST="dummy=&user=$USER&pwd=$PASSWORD&pwd_confirm=$PASSWORD"
#POST="user=$USER&pwd=$PASSWORD&dummy="
#POST="user=$USER&pwd=$PASSWORD&pwd_confirm=$PASSWORD&dummy="
POST="submitdata=action?update&user=$USER&pwd=$PASSWORD&dummy="
URL="pwdroot/pwdRoot.shtml"
curl --data "$POST" http://my_cam_lan_ip/"$URL"
Code: Select all
http://my_cam_lan_ip/axis-cgi/pwdroot/pwdroot.cgi?action=update&user=root&pwd=test2&return_page=/