#!/bin/ksh ################################################################################ # htpassaction.exe - shell script to process input to change user passwords # Drop into $CGIDIR along with htpassform.exe and edit the variables # below to reflect your apache install # Note: Rename this file to htpassaction.exe and chmod it 755 # J. David Schronce ################################################################################ APACHEHOME=/usr/local/apache PASSWDFILE=/usr/local/apache/userdb/lawuserdb ############################### # END OF CONFIGURATION # ############################### echo echo "" echo "" echo "Lawson Web Services Password Change" echo "" echo "" # Read & Process variables exp=`echo $QUERY_STRING | sed 's/=/=/g' \ | sed 's/+/ /g' \ | sed 's/%2F/\//g' \ | sed 's/$//g'` # | sed 's/\&/ /g' \ # Export variables into environment export "$exp" pw1=`echo $exp | cut -d"&" -f1 | cut -d"=" -f2` pw2=`echo $exp | cut -d"&" -f2 | cut -d"=" -f2` echo "
" echo "" echo "

Lawson Web Services Password Change

" echo "" echo "" echo "
" echo "





" if [[ -z $pw1 ]] || [[ -z $pw2 ]]; then echo "

Passwords may not be null" echo "
Use the BACK button to try again
" else if [[ $pw1 = $pw2 ]]; then $APACHEHOME/bin/htpasswd -b $PASSWDFILE $REMOTE_USER $pw1 echo "
Password updated for user $REMOTE_USER" echo "

You may be requested for your " echo "
new password when you return to Portal
" else echo "

Passwords do not match" echo "
Use the BACK button to try again
" fi fi echo "
" echo "" echo ""