Bash script for password changes help

I am super new to scripting and I am trying to create a bash script that is interactive that will change other user passwords as well as a few other thing (ie. change SMB pw, see pw expiration,lock/unlock user).
I have started it by making it check to see if the username entered is in the etc/passwd file. Where do I start if I want it to then display an interactive menu once a valid username has been found? I also would like it to loop back to the menu until the user selects the exit option.

Password systems are designed to stop you from doing what you're attempting to do. They do not accept input from a program, just a terminal. To get around this, you will need to use an insecure brute-forcing tool like expect.

maybe I'm not being totally clear in my question. As operators we change other user passwords using sudo. we have a current script that we can run that gives a menu for the operator to choose from. I am trying to create a new script to do the same thing but improve it slightly but I'm trying to build it from scratch without looking at the current script so I can get the learning experience since I just got promoted to DBA in training.

Moderator comments were removed during original forum migration.

Did you complete this task @thumbelina ?