1

I created a volume in disk utility, and called "projects.dmg". I assigned a password to it, and stored it in my home directory. All is good. I can now mount this volume in terminal, using "cd /users/me; open projects.dmg". The volume asks for a password and then mounts the volume on my desktop. GOOD. I can then use it, and all is well. When I want to unmount it, I issue the command "umount /Volumes/projects", and it disappears from the desktop. Looks good too.

HERE is the issue... When I want to mount this volume in terminal again, using "cd /users/me; open projects.dmg". The volume mounts on my desktop, WITHOUT asking for a password!

I want it to ask for the password again. I assume my umount command isn't correct.. How do I get the volume to act like I put it in the trash, so it will ask for a password when I mount it again??? Help?

3
  • OH MY! it worked!! Diskutil was the answer. Thank you!
    – Kerry Law
    Commented May 24, 2021 at 22:28
  • @user3439894 You should write that up as an answer so that this can be marked as solved
    – Ezekiel
    Commented May 25, 2021 at 0:37
  • @Ezekiel Elin, Done. Commented May 25, 2021 at 0:41

1 Answer 1

1

If you want it to ask for the password again, assuming it hasn't been stored in your Keychain, you need to eject the disk image, e.g.:

 diskutil eject projects

BTW, the disk image is mounted at /Volumes/ not the Desktop. (In Terminal, run the mount command.) It just gives access to it from the icon on the Desktop

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .