Just confirmed working method.
1. open terminal
2. drag and drop your dmg image file into terminal window to obtain the correct path
3. hdiutil chpass path/to/image (replace the "path/to/image" with the correct path you obtained, keep the single space after the command).
4. type your old password as prompted
5. type your new password and repeated once as prompted
6. Job done. Be sure you remember your new password, otherwise, you screw yourself.
1. open terminal
2. drag and drop your dmg image file into terminal window to obtain the correct path
3. hdiutil chpass path/to/image (replace the "path/to/image" with the correct path you obtained, keep the single space after the command).
4. type your old password as prompted
5. type your new password and repeated once as prompted
6. Job done. Be sure you remember your new password, otherwise, you screw yourself.