SCRIPT TO TERMINAL LOCKING AND UNLOCKING

SCRIPT TO TERMINAL LOCKING AND UNLOCKING
#!/bash/sh
echo "enter the password"
stty -echo
read pas1
stty echo
echo "re-enter the password"
stty -echo
read pas2
stty echo

if [ $pas1 = $pas2 ]
then
 stty -echo
else
echo "password dose not match"
exit
fi
stty echo
echo "system has been locked"
echo " enter the password to unlock the system"
while [ true ]
do
stty -echo
read pas3
if [ $pas1 = $pas3 ]
then
stty echo
echo "system unlocked"
exit
else
echo "enterd worng pass try again"
fi
done