Sharing Knowledge | System Admin Articles

Changing password using script



 

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..



2 Comments for "Changing password using script"

hi
we are try but not working. shall i use following scripts

# echo "user:password" | passwd

if the server is in cluster and i have to change password for 100 user's. what should we change on the given scripts.

What do you think about this Article? Add your Opinion..!

Back To Top