In AIX, If you want to change the password for a user, and you need to script this, then the following command will be helpful. For example if you want to change the password for multiple users, or on several different servers, then here's an easy way to change the password for a user, without having to type the password on the command line prompt:
# echo "user:password" | chpasswd
Replace the user – with your username
password – with the new password
you can use this command line in your scripts..