enable a user via remsh

hi guys,

has anybody a solution to enable a user via remsh (in a script)?

i know only this:

remsh $i /usr/bin/passwd -r files -d USERNAME

but on this option the user must enter a new passwd.

is it possible to set the passwd in the string or in a file and set a parameter into the string which read this passwd?

many thx

cheers

If that's the case, try this:

remsh $i /usr/bin/passwd -r files -d USERNAME <<PASSWD
PasswdHere
PASSWD