#!/bin/sh export DATE="6.6.2005";SCRIPT=${0#/rom} export TITLE="Admin: Password" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: Password EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then cat<
New Password:
Repeat Password:
 
   

Please note: The OLSR wireless network is normally not encrypted. Therefore, the password is transmitted as clear text for every page access. For security reasons, the admin pages should be viewed over wired network links only.

EOF else eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}') DIRTY= if [ -n "$post_password" ]; then if [ "$ff_pw" = "$confirm_pw" ]; then ff_pw=$(unescape $ff_pw) sh -c "echo '$ff_pw';sleep 1;echo '$ff_pw'"|passwd>/dev/null 2>&1 ff_pw=$(httpd -m $ff_pw) if [ "$ff_pw" != "$(nvram get ff_pw)" ]; then DIRTY=1 nvram set ff_pw="$ff_pw" fi else cat< The passwords do not match! The password is unchanged. EOF fi fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat< The changed settings are committed. The settings are active after the next Restart. EOF else cat< No settings are changed. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh