#!/bin/ksh ####################################################### # htpassadmin2.exe - 2nd of 2 scripts to change Apache # users passwords # Rename this file to htpassadmin.exe # J. David Schronce ####################################################### # Modify the following to reflect the files on your system ####################################################### APACHEHOME=/u01/dev803/apache PASSWDFILE=/usr/local/apache/userdb/lawuserdb ADMINAUTH=htpassadmin.cfg ####################################################### # End of configuration ####################################################### echo echo "" echo "
" echo ""
echo " " # Make sure REMOTE_USER is an admin if [[ `grep $REMOTE_USER $ADMINAUTH | wc -l` -eq 0 ]]; then echo " Sorry - you have no access here" exit 1 else # Make sure passwords are not null if [[ -z $pw1 ]] || [[ -z $pw2 ]]; then echo "Passwords may not be null" echo " Use the BACK button to try again" else # Make sure both passwords match if [[ $pw1 = $pw2 ]]; then $APACHEHOME/bin/htpasswd -b $PASSWDFILE $user $pw1 # echo "$APACHEHOME/bin/htpasswd -b $PASSWDFILE $user $pw1 " echo " Password updated for user $user" else echo " Passwords do not match" echo " Use the BACK button to try again" fi fi fi echo " |