SSH Based CP

I've Been Tinkering With This, Can't Seem To Get It To WOrk On RedHat 9.0

Code:
clear
echo "*****************[ UltimateShells ]*****************"
echo "* This Menu Will Allow You To Add Users, Delete Users  *"
echo "* Press A To Add A New User                            *"
echo "* Press D To Del A Current User                        *"
echo "********************************************************"
echo "- Choise:"
read CHOISE

if [ "$CHOISE" = "a" ]; then
clear
   echo "*****************[ UltimateShells ]*****************"
   echo "*                 Add New Shell Account                *"
   echo "********************************************************"

   echo "- Account:"
   read Account

   echo "- Password:"
   read Password

   useradd -s /bin/bash $Account
   echo $PASSWORD | passwd --stdin $Account
   mkdir /home/$Account/public_html
   mkdir /home/$Account/private
   ln -s /home/$Account/public_html /home/$Account/www
   touch /home/$Account/public_html/index.html
   chmod 755 /home/$Account
   chmod 755 /home/$Account/public_html
   chmod 755 /home/$Account/public_html/index.html
   chmod 700 /home/$Account/private
   chown -R $Account:$Account /home/$Account
clear
   echo "*****************[ UltimateShells ]*****************"
   echo "*              New Shell Account Created               *"
   echo "********************************************************" 
   echo "Account: $Account"
   echo "Password: $Password"
   echo "Html Dir : /home/$Account/public_html"
   echo "Shell Dir: /home/$Account/private"
   echo "E-Mail   : $Account@UltimateShells.com"
fi

if [ "$Choise" = "d" ]; then
clear
   echo "*****************[ UltimateShells ]*****************"
   echo "*                   Del Shell Account                  *"
   echo "*                   Listing Accounts                   *"
   echo "********************************************************"
   ls /home/ | more

   echo "- Account"
   read Account

clear
   echo "*****************[ UltimateShells ]*****************"
   echo "*            Your About To Del $Account Account        *"
   echo "*    And All Of The Users Files! Are You Sure? (Y/N)   *"
   echo "********************************************************"
   echo "- Answer:"
   read Answer

   if [ "$Account" = "" ]; then
clear
   echo "*****************[ UltimateShells ]*****************"
   echo "*                No Account Name Given!                *"
   echo "********************************************************"
  
   else
   
   if [ "$Answer" = "y" ]; then
clear
	userdel $Account
	rm -rf /home/$Account
        echo "*****************[ UltimateShells ]*****************"
        echo "*                   Account Deleted!                   *"
        echo "********************************************************"

	else

        echo "*****************[ UltimateShells ]*****************"
        echo "*                       ERROR                          *"
        echo "********************************************************"

	fi
    fi
fi

 

 

 

 

Top