Mac OS X Disk Encryption - Automation
Posted
by
jfm429
on Super User
See other posts from Super User
or by jfm429
Published on 2013-11-09T20:21:44Z
Indexed on
2013/11/09
21:58 UTC
Read the original article
Hit count: 338
I want to setup a Mac Mini server with an external drive that is encrypted. In Finder, I can use the full-disk encryption option. However, for multiple users, this could become tricky.
What I want to do is encrypt the external volume, then set things up so that when the machine boots, the disk is unlocked so that all users can access it. Of course permissions need to be maintained, but that goes without saying.
What I'm thinking of doing is setting up a root-level launchd script that runs once on boot and unlocks the disk. The encryption keys would probably be stored in root's keychain.
So here's my list of concerns:
- If I store the encryption keys in the system keychain, then the file in
/private/var/db/SystemKey
could be used to unlock the keychain if an attacker ever gained physical access to the server. this is bad. - If I store the encryption keys in my user keychain, I have to manually run the command with my password. This is undesirable. If I run a launchd script with my user credentials, it will run under my user account but won't have access to the keychain, defeating the purpose.
- If root has a keychain (does it?) then how would it be decrypted? Would it remain locked until the password was entered (like the user keychain) or would it have the same problem as the system keychain, with keys stored on the drive and accessible with physical access?
Assuming all of the above works, I've found diskutil coreStorage unlockVolume
which seems to be the appropriate command, but the details of where to store the encryption key is the biggest problem. If the system keychain is not secure enough, and user keychains require a password, what's the best option?
© Super User or respective owner