Ted Harding:
$ for user in `cat usernames`; do usermod -p $user $user; done
Not sure this will help, since it looks as though the password argument to usermod -p has to be already encrypted:
Thanks to Adam:
for user in $(cat usernames); do usermod -p $(mkpasswd $user aa) $user done