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

Share this

Related Posts

Previous
Next Post »

2 comments

Write comments
February 8, 2011 at 10:19 AM delete

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

# echo "user:password" | passwd

Reply
avatar
Anonymous
October 2, 2013 at 1:08 PM delete

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

Reply
avatar

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