Maybe I do something wrong, but it doesn't work for me.

bash installpw.shinstallpw.sh: line 5: $'\r': command not found

update
Solved. I edited the bash file from a Windows text editor and...