Urgent Korn Shell scripting Help Pleaaaase...

Hello All,
Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation.
I tried providing the input file as the value for password field but password change requires tty so my password from an input file obviously wont gonna work.
Any help will be really appreciated.
Because of this road-block, I have not been able to move on with the main scripting.

thanks in advance.

You have to be logged in as root. You do not edit the /etc/passwd file.

Generally most systems let root change another user's password by using the passwd command. Since you don't say what OS you have, try either of

passwd --help

or

man passwd

You have been posting this question in various forms since January.
Please do state what Operating System you have and whether it is described as a "secure" system.
Solutions to this problem are not necessarily portable.
You may wish to look at this clever use of shell redirect to handle the problem.
http://www.unix.com/shell-programming-scripting/11359-need-script-passwd-cant-use-expect-tool-post40791.html

Using an expect script would deal with your issue, e.g.

#!/usr/local/bin/expect -f
spawn passwd [lindex $argv 0]
set password [lindex $argv 1]
expect "password:"
send "$password\r"
expect "password:"
send "$password\r"
expect eof  

This scripts is from here. This script would take the username as the first paramete and the desired password as the second parameter. The path to where expect is installed may need changing to reflect where expect is installed on your system.