Thats some task to do. Maybe this could work.
Make it possible that you login via ssh without having to promt a pasword. check out
http://wiki.met.tamu.edu/index.php?t...ing_a_Password
to do this.
then change the password on main machine and copy line from /etc/shadow to file.
make bash script that replaces root line from /etc/shadow with the line you saved to file. (use sed for that)
via scp copy bash and file with new password to box and
*somehow execute bash file*
last two steps with a bash script.
Dunno if its possible to remote execute a bash script, but should be. The other thing is if the hash of the shadow file will the interperted the same on all machines.
But it's worth a try