The Samba-Bugzilla – Bug 4270
smbpasswd -U -r command run as root prompts for existing password
Last modified: 2006-11-29 17:05:26 UTC
If smbpasswd is run as root, then on the local machine it doesn't prompt for the existing user password.
However, if you run smbpasswd -U <user> -r <remote> as root you get prompted for the user's old password on the remote machine first. Unless you get this right, the new password cannot be set.
In my case, root passwords on both machines are identical. If you give the correct remote user's password then you can set a new password, so there seems to be nothing wrong in the connection between machines.