how to Remote Reset Password for User ?

Hello, everyone i have a little scenario and would like help ,
SCENARIO
OS : SunOS 5.10
Shell: KSH
UserName 1 connects to Server1 .He should run a little command or somthing to server2 that Resets the password of user2.
i have tried this :

 ssh user@server2 '/usr/local/bin/sudo passwd user2'

it doesn't work because of the permission, the user that i try to connect to the remote server hase permission of ALL in the SUDOERS on the remote server so when i connect directly to the server and do SUDO it works, remotly it does not

pleazzzz

---------- Post updated at 06:23 AM ---------- Previous update was at 02:50 AM ----------

if there is any other way to remote adduser and resetpassword it will also ok
just in KSH is required