Before you get to how you will store the password, you need to sort out how you will read the values from the file correctly. In bash, the primary tool for determining how the shell will break a line into individual tokens is the Internal Field Separator (default: space tab newline). The process is called word-splitting The IFS variable allows you to set the characters that will control word-splitting.
You can use that to your advantage in reading lines such as yours by including a comma in IFS. This will allow you to specify individual variable to read each name, initial, last, user name and password into. A while loop is the normal way to accomplish this -- and it allows you to set the IFS for that block of code without effecting the remainder of the script.
An Example, in your case, would be:
#!/bin/bash
[ -z "$1" ] && { ## validate one argument given on command line
printf "error: insufficient input. usage: %s filename.\n" "${0##*/}"
exit 1
}
[ -r "$1" ] || { ## validate it is a readable filename
printf "error: file not found/readable '%s'.\n" "$1"
exit 1
}
## read each line in file separated by ','
# set Internal Field Separator to break on ',' and '\n'
# protect against lack of '\n' on last line with $pw test
while IFS=$',\n' read -r first mi last uname pw || [ -n "$pw" ]; do
printf "name: %-5s %s. %-6s user: %s pass: %s\n" \
"$first" "$mi" "$last" "$uname" "$pw"
## Create User Accounts/Store Password Here...
done <"$1"
exit 0
Input
$ cat dat/useracct.txt
John,N,Snow,seords,cuai2Ohzdh
Jill,O,Rain,reords,cuai3Ohzdh
Jane,P,Sleet,peords,cuai4Ohzdh
Output
$ bash readuserfile.sh dat/useracct.txt
name: John N. Snow user: seords pass: cuai2Ohzdh
name: Jill O. Rain user: reords pass: cuai3Ohzdh
name: Jane P. Sleet user: peords pass: cuai4Ohzdh
You can then create the user accounts with the desired options and store the password any way you like. Let me know if you have any questions.