One question that I get a lot from Mac users is how to password-protect individual folders without having to use your administrative password.
The bad news is that it’s not possible. You can lock folders and restrict access to them, but to unlock them all one needs is the administrative password. For people who share their computers with others, and don’t want to create multiple user accounts, you can use Disk Utility to create password protected, and scaleable, disk images.
If you’re not too familiar with Disk Utility I would advise to not try this. Disk Utility is a very powerful application that can do a lot of good, but also a lot of harm.
After launching Disk Utility navigate to File > New Blank Disk Image. This will allow you to create an empty disk image of any size of your choosing. It also gives you several nifty options to play with; password protection (128/256bit), sparse (scaleable), and more. The great thing about making a sparse disk image is that its contents are scaleable, which means you can drop new things into in or take stuff out as you see fit and the Disk Image’s size adjusts accordingly.
The first thing you want to choose is how big this Disk Image will be. Strangely enough, creating a new Disk Image follows the same rules as when buying a new hard drive. You pay for a hard drive that’s 250GB, and you get one that is actually 231GB. It sucks, but that’s how it is. These Disk Images follow the same rules so make sure to compensate for that.
The next thing you’ll want to change is the encryption (128-bit is usually OK). Last but certainly not least you must choose the correct image format. This is where things get a little more complicated. What you’ll want to do is choose Sparse Image. This will allow you to mount the Disk Image (if you know the password you will choose in the next step), and drag files onto and from the mounted virtual drive. Why is this different than a read/write type of Disk Image? Well, let’s say that you chose to make your image with 100MB of space. If yoiu do not choose Sparse Image, this means that the Disk Image, mounted or not, will take up 100MB of space on your hard drive. If you choose Sparse it will only take up as much space as its contents. Pretty nifty, right?
This does have its downside however. Once deleting files from the mounted virtual drive, the size of the Disk Image will not be reduced. So basically if you fill it up with 5GB of data the Disk Image will adjust accordingly, but when you delete data from it, it will remain at 5GB. You can, however, resize the Disk Image while it is unmounted through the Terminal by entering something like this:
hdiutil resize -size 50g MyFile.sparseimage
The 50g resizes the Sparse Image file to 50GB.
Once you have chosen all of your parameters click on Create. You will be prompted to choose a password for your new disk image. You will have to enter this password every time you mount the image.
Enjoy!
Tags: OS X
COOL BUDDY! wish i would of read it this morning. Could of used it.
Yeah, this is an awesome trick. I’ve been learning a lot about Sparse images lately. Thought I would share.