This question already has an answer here:
- Change Password Programmatically 2 answers
if the script was
useradd ...............<new_user>; passwd <new_user>;. is there a way to put the new password in a script? I don't need to change or add an old password for an existing user. I need to enter a brand new password twice when prompted.