TweetFollow Us on Twitter

MacEnterprise: FileVault in the Enterprise, Part 1

Volume Number: 24 (2008)
Issue Number: 07
Column Tag: Security

MacEnterprise: FileVault in the Enterprise, Part 1

Data security for OS X administrators

By Greg Neagle, MacEnterprise.org

Data Security

Data security is a hot topic in Enterprise IT these days. As laptop usage increases, pushing out traditional desktops, the risk to company data is greater than ever. If a laptop is stolen or lost, the replacement cost of the hardware may be a pittance compared to the value of the data stored on the laptop's hard drive.

Therefore many companies are mandating some sort of data encryption for company laptops. If a laptop is then stolen or lost, the data would be inaccessible to the thief. "Whole-disk encryption" is a direction many companies are moving toward, but as of this writing, there are no shipping products that will encrypt a Mac boot volume (although some companies have products in the beta stage). So Mac administrators must work with what is available: a technology Apple calls "FileVault," which secures users' home directories with AES-128 encryption.

In part one of this series, we'll cover preparation and implementation of FileVault in an enterprise environment.

In part two, we'll examine some of the issues you may encounter when implementing and supporting FileVault in an enterprise environment, and techniques and tools to use to deal with some of these issues.

FileVault - encryption for user data

FileVault works by storing a user's files in an encrypted disk image file. Disk images are familiar to OS X administrators — many large organizations set up their OS X machines by restoring a disk image to the machine's hard drive, and many software installers are distributed in the form of disk image files. FileVault uses a disk image that is encrypted with the user's login password. When the user logs in, his or her password is used to unlock the disk image. The image is then mounted under /Users/<username> and for the most part, looks and behaves like a normal user home folder.

There are two primary risks associated with implementing FileVault for your users. The first is that they forget their password and cannot access their data. Since the password is the same as the login password, this seems an unlikely scenario, but there are other ways a user can lock themselves out of a FileVault-protected account. It's not uncommon for organizations to implement a web page that all users can go to change their password. If, however, a user with a FileVault-protected account does this, the FileVault disk image is not updated with the new password – this only happens if you use the Accounts preferences pane to change your password. Another way the password can get out of sync is if the user has multiple machines, and changes their password on a machine other than the laptop with the FileVault-encrypted home directory. Apple has provided a way for administrators to unlock FileVault disk images – this is the FileVault "master password". We'll look at this later in the article.

The second primary risk associated with FileVault is data corruption. Under Tiger, FileVault-protected home directories are encrypted disk images, and since a disk image is a single file, corruption of that single file can lead to the loss of the entire FileVault home directory. This type of corruption is rare, but is possible. In Leopard, FileVault now uses "sparsebundles" as the disk image format. This stores the disk image data in multiple files within an enclosing directory. Apple claims better performance, and importantly, better reliability, which presumably means that disk image corruption is even less likely. Your best defense against data corruption is backups. Backups are always important for enterprise data, but they are even more important for FileVault-protected data.

Preparing for FileVault

Before implementing FileVault in your organization, you might want to do some prep work. The most important bit of prep work is to set the FileVault master password for all your machines. This is the password you can use to get access to a FileVault-protected disk image if the user's password has been forgotten or is otherwise not available. In order to be useful, you almost certainly want this master password to be the same on all the machines you manage.


10.5's Security Preference pane – FileVault tab

To do this, you'll create a FileVault master password on one machine, and then copy certain files to all your managed machines. Open the Security preference pane and click Set Master Password. Since this will be deployed to all your managed machines, and since changing it (and propagating that change to existing FileVault-protected accounts) is difficult, make sure it's a non-trivial password, and do not make it the same as any other admin or root password you have in use. Use the Password Assistant to check on the quality of your chosen password.

Two new files are created in /Library/Keychains: FileVaultMaster.cer, and FileVaultMaster.keychain.

To implement the FileVault master password on all the machines you manage, simply install these two files on all your managed machines. You can use any method to do this (put them in your install image, using ARD, radmind, FileWave, etc), but make sure they are in place before FileVault is turned on for any accounts on a given machine. If FileVault has been turned on before these FileVaultMaster files are installed, the pre-existing FileVault-protected accounts cannot be unlocked using the FileVault master password you just created.

The second most important preparation task is to ensure you have a method to backup user's home directories. If you are using Mobile Accounts and Portable Home Directories, you can simply back up the network home directories on the server. If you can't use Portable Home Directories, you may decide to use something like Retrospect or Time Machine to directly backup user home directories.

You may or may not want to implement the next preparation task: turning on password hints. If your users forget their passwords, in order to get a prompt to allow an administrator to unlock the account using the master password, Show password hints must be turned on in the Accounts preference pane, under Login Options, or if you are managing your clients via MCX, in Workgroup Manager, manage this Preference under Login->Login Window, checking Show password hint when needed and available. One last option is to do this via command-line, perhaps as part of a script:

sudo defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint 3

In Tiger, this setting is labeled Show password hint after 3 attempts to enter a password in Workgroup Manager's preference management settings.

Additionally, the MasterPasswordHint key must exist in the defaults keys for /Library/Preferences/com.apple.loginwindow. Normally, this is set when you create the FileVault master password via the Security preferences pane. But if you simply distribute the /Library/Keychains/FileVaultMaster.cer and /Library/Keychains/FileVaultMaster.keychain files to other machines you manage, this key will probably not be set.

sudo defaults write /Library/Preferences/com.apple.loginwindow MasterPasswordHint ""

will do the job. (It's OK to have an empty hint, but the key must exist.)

Enabling password hints is itself considered a security risk in many organizations, so consider if you really want to do this. If you don't, there is no way from the GUI for an admin to recover a FileVault-protected home directory — but an admin can still do so from the command line.

The final preparation task is training. Train your tech support staff on FileVault, and provide a method for your users to find out more about FileVault as well. The better you document and train, the higher users acceptance will be.

Local preparation

There are a few things you can do on the local machine before turning on FileVault that will increase your odds of success. First, make sure the startup disk is healthy. Run Disk Utility to verify, and if needed, repair the startup disk. Second, minimize the amount of data that needs to be copied to the encrypted disk image - delete unneeded files. Empty the trash. rm -R /Users/username/Library/Caches/* to get rid of cache files. If you use Norton/Symantec AntiVirus, turn off AutoProtect. This will speed up creation of the new disk image and avoid issues where Norton AutoProtect interferes with disk image creation. (But be sure to turn it back on later!)

Finally, make sure there is enough free disk space on the startup disk for the FileVault conversion. When FileVault is enabled for an account, an encrypted disk image is created, everything is copied from the "unencrypted" home directory to the encrypted disk image, and finally the items in the unencrypted home directory are deleted. This means that you must have more free space on the hard drive than the size of the home directory you are encrypting. If the user has 60GB of data in his or her home directory, there needs to be more than 60GB free on the hard drive.

Turning on FileVault

Turning on FileVault is straightforward. Log in as the user for which you'd like to turn on FileVault. In the Security preferences pane, click the "Turn On FileVault..." button. If the preference pane is locked, you'll be asked to enter an admin password (which may effectively prevent users from turning on FileVault by themselves). You'll then be prompted for the user's account password (which may effectively prevent admins from turning on FileVault for users without their involvement). You'll be presented with one last dialog, informing you of the dire consequences that await you should you forget your login password and lose the master password.


FileVault confirmation dialog

New to Leopard is the option to turn on secure virtual memory from this dialog; in both Leopard and Tiger it can also be turned on in the Security preference pane. Also note the check box labled "Use secure erase". You should check this. If you do not, when OS X removes the original home folder after creating the FileVault disk image, it is possible to recover some or all of the data using an unerase or file rescue utility. This could defeat much of the purpose of turning on FileVault.

Once you click "Turn On FileVault" in this final confirmation dialog, the current user will be logged out and the FileVault conversion process will start. If anything interrupts the logout (such as cancelling when asked what to do with an unsaved document), the FileVault conversion will be cancelled and you'll have to visit the Security preference pane to start again from the beginning.

If the FileVault conversion process fails for any reason, the partially-created encrypted disk image is removed, and the original home directory is left untouched. Possible reasons for failure of the FileVault conversion are a full hard drive; drive or file system errors or failures; and anti-virus scanning of the drive image.

Automating FileVault

New to Leopard is the ability to enable FileVault protection when creating new accounts, or creating mobile accounts. This saves a step: you no longer have to create the account, then login and turn on FileVault. More importantly, you can use MCX policies to enforce FileVault so that it is automatically turned on for all new mobile and local accounts.

Enforcing FileVault on mobile accounts is straightforward using Workgroup Manager. There is a new checkbox in Mobility preferences under Account Creation Options, labeled Encrypt contents with FileVault.

Apple doesn't make enforcing FileVault for local accounts quite as easy to discover or implement, but it is possible.

In Workgroup Manager, choose a Computer or ComputerGroup to manage, click the Preferences icon in the toolbar, then select the Details pane. Click the "+" button to add a new preference domain. Navigate to /Applications and double-click on the System Preferences app.

You should now have the com.apple.systempreferences domain available to you, and it should look like this:


Preferences details in Workgroup Manager

Double-click the entry for com.apple.systempreferences, and delete all the imported keys - we don't want any of them. Turn down the Always dictionary, and add a new key like this:


Managing com.apple.systempreferences keys

Save your changes.

Once the updated management settings become available on your managed client machines, you'll see that when creating a new local account, the Turn on FileVault protection checkbox is pre-selected, and disabled so that it cannot be deselected. All new local accounts will automatically have FileVault turned on as they are created.


FileVault enforced for local accounts

To be continued...

We've prepared our infrastructure, enabled FileVault on existing user accounts, and looked at options for enforcing FileVault for all new accounts. In part two of this series, we'll look at some issues you and your users might encounter, and what you can do to manage these issues.


Greg Neagle is a member of the steering committee of the Mac OS X Enterprise Project (macenterprise.org) and is a senior systems engineer at a large animation studio. Greg has been working with the Mac since 1984, and with OS X since its release. He can be reached at gregneagle@mac.com. The MacEnterprise project is a community of IT professionals sharing information and solutions to support Macs in an enterprise. We collaborate on the deployment, management, and integration of Mac OS X client and server computers into multi-platform computing environments.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.