#!/usr/bin/haserl
<%
echo -en "content-type: text/plain\r\n\r\n"

pass1="$GET_pass1"
pass2="$GET_pass2"

(echo "$pass1"; sleep 1; echo "$pass2") | passwd &> /dev/null
if [ $? -eq 0 ]; then
	#force instant password change
	/etc/init.d/uhttpd restart 2> /dev/null
else
	echo "An error has occurred."
fi

%>
