there is a known Bug in 2015.1.x with the password variables. The encrypted value of the password is not transferred back correctly when the ODS Variable is used. This causes problems when passwords should be used.
As far as i have seen in the RN of 2015.2.2, this issue should be fixed in that version. But since i'm busy with other topics, i did not have the time to verify that again. Please have a look in the RN of 2015.2.1 and 2015.2.2, there should be something written about this issue.
Thanks for your fast answer.
Do you know if there is a workaround for this?
Well, the only "workaround" i know is to use a regular password field instead of an ODS Variable. Then the password is transfered correctly. But as this not really a workaround but back to the originally intended function, i would not call it a workaround.
Had the same problem with a script to change the local admin password at a customer. And the answer from support was, i have to wait for DSM 2015.2...