Fully unmount volume?
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?
Solution 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