Wants to create 3 users in 400 servers

I wants to create 3 users and set password for the users in 400 servers. I can run this script without error. If wants to set the password in the same command it is not working. Like that i have to create 3 users

#!/usr/bin/ksh
for server in `cat /tmp/servers`
do
   echo "servername = $server"
   ssh $server 'sudo /usr/sbin/useradd -d /home/user -m -c "DBA Team at `date +%d-%m-%Y`" -s /usr/bin/ksh user' exit
done

this command showing the error if i add the passwd cmd in this script

ssh $server 'sudo /usr/sbin/useradd -d /home/user -m -c "DBA Team at `date +%d-%m-%Y`" -s /usr/bin/ksh user; sudo passwd user' exit

I would suggest centralized user management with NIS or LDAP.

I dont have permission

use openssl to generate a md5 based bsd password and pass it to useradd

PASSWORD=$(openssl passwd -1 plainpassword)
useradd -p'${PASSWORD}' -d /home/user and the list goes on

Solaris and AIX dont have this option

Then ask for that permission to be granted. "useradd" doesn't allow to set a user's password for security reasons. NIS and LDAP are designed to handle such requirements.