How to change password of the .sparseimage encrypted image on El Capitan?
Option 1: Disk Utility
In Disk Utility: select the image in the sidebar, then File → Change Password...
(You must unmount the image before you can reset it).
Option 2: Terminal
In Terminal:
hdiutil chpass &lt;image&gt;

More info: man hdiutil