Urgent !!! - Script to Change passwords in unix

I have SunOs 5.8. I need to change password using a unix shell script. I have tried to pipe the passwords to the passwd command but does not work. Pls provide a script to change passwds of a list of users using a shell script.

( I have also tried crypt() but did not work)

The flow of the program...

  1. A list of users with passwords to be given to them.

  2. Script to read users and their passwords fron the list file( its a txt)

  3. use passwd command to change or set the password.

You can also provide any alternative way for doing above using .shadow or .passwd file. It will be appreciated.

I need this urgent...

Awaiting help ...

Tofani

who Tofani,

slow down.

------------------------
Pls provide a script to change passwds of a list of users using a shell script.
-----------------------

Of course we would like to help. Doing your homework is something different. crypt does the work B.T.W

Use Perl for this. Maybe an example of what you already tried would help.
Good luck

Regs David

Actually, we get this question at least once a month. If you use the search function, you will get dozens of answers. And you would have had those dozens of answers in a few seconds....an important consideration for a "urgent" question.

I would also like to point out that the rules require a search prior to posting a question.