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

MitzEclipse

macrumors 6502
Original poster
Sep 26, 2012
303
48
Running Sequoia latest MacOS

Two questions -

I have a file docs.dmg which has a password

1) how do I change this .dmg password - reading previous posts, the solution is to create a new .dmg file and start over. Seems over the top - should be an easier way?

2) I accidentally clicked "remember password in key chain" now when I open the .dmg file, there is no prompt for password! How do I clear this? I searched everywhere in system settings, in the get-info of the .dmg file itself and I do not have apple passwords enabled.

Thank you
 
"I accidentally clicked "remember password in key chain" now when I open the .dmg file, there is no prompt for password! How do I clear this? I searched everywhere in system settings, in the get-info of the .dmg file itself and I do not have apple passwords enabled"

Seems to me that you'll have to go into "Keychain Access", and find and delete the saved password (from Keychain Access).

Then, the next time you try to mount the image, it will again ask for a password.

As far as CHANGING the password goes, I'm going to take A GUESS that it can't be done. So, like you said, one has to create a NEW dmg file with a new password, and "copy things over".

I could be wrong.
 
Run this in Terminal to change the password > hdiutil chpass path/to/image

Then after that the first time you open the DMG you will be asked if you want to store the password in Keychain.
 
Last edited:
Thank you both for the responses. @Fishrrman 's suggestion going into Keychain access worked! I wasn't aware about this and also saw so many old wifi network passwords I connected to I deleted to clean up.

Separately, I still don't know how to change the password of a DMG file - that is seriously lame you have to create another one!
 
Re Weaselboy's reply 3 and NoBoMac's reply 5 above...

Would this also work?
1. have finder window open showing dmg file
2. open terminal and enter
hdiutil chpass (leaving a single space character after "chpass")
3. grabbing the dmg file and dropping it into terminal's window, completing the "location" portion of the command
???

EDIT:
I just tried this (created a new dmg with a password, and then typed the command into terminal and dragged the dmg into the window).
It works.
Terminal will ask for the old password first.
Then it will ask you to enter the new password, and re-enter a second time to confirm it.
 
Last edited:
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.