#!/bin/bash

read i
eval $(echo $i | sed 's/&/;/g')
if [ "$pass1" = "$pass2" ]
then if htpasswd -b /var/www/passwd/shadow $usrname $pass1
     then MSG="Your account has been created"
     else MSG="Your account could not be created"
     fi
else
     MSG="Passwords do not match"
fi
echo "Content-type: text/html"
echo
echo " <HTML>
<HEAD>
<TITLE>Creating User Account</TITLE>
</HEAD>
<BODY>
$MSG <br>
<a href=http://server01/sam>Continue</a>
</BODY>
</HTML>"
