Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Doc69

macrumors 6502a
Original poster
Dec 21, 2005
653
90
Can you change the password on a disk image? In Disk Utility, 'Change Password' is grayed out if the image is mounted, and if the image is not mounted it does not show up in Disk Utility.
 
From Terminal with hdiutil chpass image
"change the passphrase for an encrypted image. The default is to change the password interac- tively.
Common options: −recover and −srcimagekey. The options −oldstdinpass and −newstdinpass allow, in the order specified, the null-terminated old and new passwords
to be read from the standard input in the same manner as with −stdinpass."

hdiutil manual https://ss64.com/osx/hdiutil.html
or open from Terminal in Preview with
Code:
man -t hdiutil | open -fa "Preview"
 
From Terminal with hdiutil chpass image
Thanks, that worked! To clarify for anyone else wanting to try this, enter "hdiutil chpass " in Terminal and then drag the image file into the terminal window. Then press return.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.