I'm not sure I fully understand the script; it has some complex code, apparently to do a simple task. Sorry if I have misunderstood what the script is doing ...
Is the error message coming from smbpasswd -e $line -w brook123
? If so it would be very helpful to put an echo in front of it so the actual command generated can be seen: echo smbpasswd -e $line -w brook123
According to the smbpasswd man page the -e option doesn't take a option argument. It may use the modern syntax of accepting non-argument options anywhere on the command line but smbpasswd -e -w brook123 $line
would be safer, in case it doesn't.
The only non-option argument that smbpasswd does take is username which must be a single word. The script seems unnecessarily complex regards taking usernames from the users.txt file where they are simply presented, one per line. There is no need for the "exec"ing and IFS setting (and why set the IFS to newline+backspace?!). This simpler code should be all that is required (not tested)
IFS= while read -r user
done < $FILE
and the processLine function (which could more aptly be called processUser) could more simply be
smbpasswd -e -w brook123 "$1"