I have an encrypted and password protected sparsebundle that I mount and unmount from time to time from the terminal. I want the system to ask for the password every time I mount it, but for whatever reason, it always remembers.
Here is how I mount it:
hdiutil attach ~ / path / to / my / package -mountpoint ~ / my / mount point
Here are some examples of attempts to disassemble it:
hdiutil detach -force ~ / path / to / my / bundle
hdiutil detach -force / Users / me / path / to / my / bundle
hdiutil eject -force ~ / path / to / my / bundle
diskutil eject ~ / path / to / my / bundle
diskutil unmounts the force ~ / path / to / my / package
(I've read here that
hdiutil disassemble is not enough for the system to forget the password.)
However, no matter what I try, the system "usefully" uses the password every time.
The system forgets the password only when I use the eject button in the Finder.
In addition, my keychain does not contain any entries suggesting that the password has been cached. (At least, I can not find it, there is no kind
password disk image.)
I even created a new sparsebundle, with a new name and a different password, but the problem persists.
What do I forget here? How can I make sure that the system always asks for the password each time I mount the sparsebundle?