I have a question about a while loop. I have been searching and I can't find anything that will assist. I might be missing something. I am a little new with shell. I am trying to verify the user password to make sure that it is correct. I was able to get part of it but the loop exits out once the user inputs their password. I want to loop to continue until it is complete. Below I have attached what I do have. I know that I am missing something, I am just not sure. I was able to create an infinite loop but I wasn't able to figure the rest out.
read -p "Input new username please?: " user
read -p "Input password: " password
read -p "Re-enter password: " verify
if [ "$password" != "$verify" ]
then
echo "Password does not match. Please try again."
else
echo "Password Successful!!"
fi
while : ; doput your code here. If the password matches includebreakand at the end of the loop put adone