tricks!

it’s non-obvious how to password-protect a file in mac os x. one strategy i’ve come across is to password-protect a disk image using disk utility and then store sensitive files inside of that image. here’s how to go about doing that.

first, open disk utility:

next, click on “new image.” give your new disk image a name and make sure to turn on encryption. make sure that when you type in your password, you turn off password storage in keychain. (after all, what good is it to password protect a file, only to have your computer auto-fill-in that password every time someone tries to open it?)

at this point, you should have a mounted volume and a .dmg file on your desktop. drag files into the volume to have them password-protected. (note that you’ll of course have to delete the original copy of the file to truly hide the information.)

finally, if everything has gone according to plan, you’ll see that whenever you try and mount the .dmg file, os x will ask you for a password: