Archive

Archive for June, 2013

FileVault 2 on OS X 10.8.x is now FIPS 140-2 Compliant

June 29, 2013 Leave a comment

Apple announced on Friday, June 28th that the FIPS 140-2 validations for the cryptographic modules used by iOS 6 and OS X 10.8.x have now been completed. This is significant news for Mac admins who want to use FileVault 2 in government and regulated industries (such as financial and health-care institutions.)

For folks who haven’t heard of it before, FIPS 140-2 is an information technology security accreditation program run jointly by the US and Canadian governments. This program is used by private sector vendors to have their cryptographic modules certified for use in US and Canadian government departments and private industries with regulatory requirements for security.

As part of today’s announcement, Apple has released KBase articles, tools and guidance for security offices who deal with encryption:

Apple FIPS Cryptographic Modules v3.0http://support.apple.com/kb/DL1555

Mountain Lion: How to set up and maintain a FIPS-enabled systemhttp://support.apple.com/kb/HT5396

Crypto Officer Role Guide for FIPS 140-2 Compliance OS X Mountain Lion v10.8http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT5396/Crypto_Officer_Role_Guide_for_FIPS_140-2_Compliance_OS_X_Mountain_Lion_v10.8.pdf

FIPS Administration Tools v3.0http://support.apple.com/kb/DL1555

FileVault 2 is listed as being FIPS 140-2 Compliant as part of the Crypto Officer Role Guide for FIPS 140-2 Compliance OS X Mountain Lion v10.8 documentation, in the Compliant Applications and Services section.

Screen Shot 2013-06-28 at 8.01.43 PM

Erasing a FileVault 2-encrypted Volume

June 29, 2013 31 comments

On occasion, it’s necessary to erase a FileVault 2-encrypted volume. However, Disk Utility won’t let you erase or repartition until you unlock or decrypt.

Screen Shot 2013-06-28 at 11.29.38 PM

Screen Shot 2013-06-28 at 11.29.11 PM

This can be an issue for a malfunctioning FileVault 2-encrypted volume that will not let you either unlock or decrypt. To help with this, the diskutil tool provides a way to quickly delete CoreStorage volumes. This includes the ability to erase encrypted CoreStorage volumes (aka FileVault 2-encrypted volumes) without first decrypting or unlocking them.

To do this, first run the following command:

diskutil cs list

This will give you with a list of the CoreStorage volumes on your system. Unless you have a Fusion drive or multiple encrypted drives, your FileVault 2-encrypted drive should be the only one listed.

In the listing, you will want to select and copy the Logical Volume Group (LVG) alphanumeric UUID for your CoreStorage volume. The LVG should be the first UUID listed and it’s the one we want to delete.

Screen Shot 2013-06-28 at 11.02.40 PM

Next, run the following command:

diskutil cs delete UUID_here

Screen Shot 2013-06-28 at 11.04.29 PM

This will delete your CoreStorage volume and reformat it as an unencrypted HFS+ volume.

Screen Shot 2013-06-28 at 11.04.55 PM

Installing Apple’s updated Java for OS X 2013-004 and Java for Mac OS X 10.6 Update 16 over previous versions

June 24, 2013 Leave a comment

As part of dealing with the issues caused by the initial versions of Apple’s Java for OS X 2013-004 and Java for Mac OS X 10.6 Update 16, Apple has recommended installing the revised version of the updates overtop of the existing update in order to replace the problematic Java builds.

The fixed Java builds are the following:

Mac OS X 10.6.x: 1.6.0_51-b11-456-10M4509 (currently installed by Java for Mac OS X 10.6 Update 16)

Mac OS X 10.7.x – Mac OS X 10.8.x: 1.6.0_51-b11-457-11M4509 (currently installed by Java for OS X 2013-004)

If you’ve already installed Java for Mac OS X 10.6 Update 16, it appears that there’s no way to use the softwareupdate tool to install it again. For 10.6.x Macs that had previously installed Java for Mac OS X 10.6 Update 16 and got the problematic build, the installer will need to be downloaded from Apple and then installed on your 10.6.x Mac.

For 10.7.x and 10.8.x however, there’s a way to override the install check that softwareupdate uses which is specific to Apple’s Java updates. By setting the JAVA_INSTALL_ON_DEMAND environment variable for softwareupdate, you can force softwareupdate to install the latest Java update from Apple. This allows you to leverage softwareupdate to re-install the updated Java for OS X 2013-004 over an existing Java for OS X 2013-004 installation that included the problematic Java build.

Michael Kuron posted a script to the MacEnterprise list that I’ve modified. The modified script works pretty well in my environment and does the following:

1. Checks the current OS to see if the Mac is running Mac OS X 10.7.x or later. If not, the script will exit and display the following message:

Not supported on this version of Mac OS X

If the Mac is running 10.7.x or higher, the script runs the following actions:

2. Checks the Java version and displays the results

3. Sets the JAVA_INSTALL_ON_DEMAND environment variable

4. Uses the softwareupdate tool to check for and get the name of the latest Apple Java update for 10.7.x and 10.8.x

5. Installs the latest available Apple Java update for 10.7.x and 10.8.x

6. Checks the current Java version and displays the results

For those interested, the script is available on my GitHub repo:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/install_apple_java_on_demand

Casper Extension Attribute script to detect Java build 1.6.0_51-b11-456-10M4508

June 23, 2013 4 comments

To follow up on the re-release of Apple’s Java For Mac OSX 10.6 Update 16 and Java for OS X 2013-004 updates, which fixes a problem with the previous versions of the updates, there’s a need to identify which machines got the problematic version of Java. The problematic Java build is 1.6.0_51-b11-456-10M4508 and can be identified by running the following command:


/usr/libexec/java_home -v 1.6 -exec java -version

Update – June 24, 2013: On further examination, it looks like Apple used two different build numbers:

Mac OS X 10.6.x: 1.6.0_51-b11-456-10M4508
Mac OS X 10.7.x – 10.8.x: 1.6.0_51-b11-456-11M4508

To help Casper admins identify which Macs have 1.6.0_51-b11-456-10M4508 or  1.6.0_51-b11-456-11M4508 installed, I’ve posted the following Casper extension attribute to my GitHub repo:

This script uses the java -version command to check the Java build version. If Java builds 1.6.0_51-b11-456-10M4508 or 1.6.0_51-b11-456-11M4508 are detected, the script reports Installed. If neither 1.6.0_51-b11-456-10M4508 or 1.6.0_51-b11-456-11M4508 are installed on the Mac, the script reports Not Found.

For those interested, the script is available on my GitHub repo:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/Casper_Extension_Attributes/check_for_java_build_M4508

MATLAB problems after Java for Mac OS X 10.6 Update 16 or Java for OS X 2013-004 are installed

June 21, 2013 12 comments

After the latest round of Apple’s Java updates, some Java-based applications began exhibiting problems. At my shop, MATLAB was one of the applications that was affected by this.

The root cause was discussed and identified in this StackOverflow thread and appears to affect Swing applications, including MATLAB.

Symptoms

After applying Apple’s Java For Mac OSX 10.6. Update 16 to a 10.6.x Mac, or Java for OS X 2013-004 to a 10.7.x – 10.8.x Mac, MATLAB 2012b and below stops functioning correctly. You can open the program but it does not register any mouse or keyboard interaction until the window is resized.

Status as of Friday, June 21

After speaking with Mathworks support, I tested and verified the following:

MATLAB R2011a runs in Mac OS X 10.6.8, 10.7.5 and 10.8.4 with the latest Apple Java updates installed.

MATLAB R2013a runs in Mac OS X 10.7.5 and 10.8.4 with the latest Apple Java updates installed. MATLAB R2013a does not support 10.6.8.

At the moment, here are the options that appear to be available:

For 10.6.x: MATLAB users should install and use MATLAB R2011a

For 10.7.x – 10.8.x: MATLAB users should upgrade to MATLAB R2013a if possible. If not possible to upgrade to 2013a for code compatibility reasons, MATLAB users should install and use MATLAB R2011a.

Other options may include trying to roll back Java to the previous version, but that can cause other issues. I don’t recommend trying that unless neither MATLAB R2013a or MATLAB R2011a are viable options.

Update – Friday, June 21 at 5:15 PM EDT

It looks like Apple has resolved this issue by posting new versions of the Java For Mac OSX 10.6. Update 16 and Java for OS X 2013-004 installers:

Java for OS X 2013-004http://support.apple.com/kb/DL1572
Java for Mac OS X 10.6 Update 16http://support.apple.com/kb/DL1573

I’ve tested the newly rev’d Java for Mac OS X 10.6 Update 16 update on 10.6.8 and MATLAB R2012b. The new update allowed MATLAB R2012b to run normally again. I still need to test 10.7.5 and 10.8.4, but this looks promising.

Screen Shot 2013-06-21 at 4.17.02 PM

Update – Friday, June 21 at 9:40 PM EDT

I’ve now tested the new revision of the Java for OS X 2013-004 update on Mac OS X 10.7.5 and 10.8.4, both times with MATLAB R2012b. The new update allowed MATLAB R2012b to run normally again on both OSs.

Screen Shot 2013-06-21 at 9.27.08 PM

Screen Shot 2013-06-21 at 9.35.06 PM

Enabling FileVault 2 pre-boot login screen functions from the command line

June 19, 2013 11 comments

There’s a couple of functions that you can enable on your Mac that will show up at the FileVault 2 pre-boot login screen. The two functions that I’m familiar with are the keyboard input menu and a text-only login banner.

On an FileVault 2-encrypted Mac, you can go into System Preferences and enable these functions. At the next restart, they should show up at the FileVault 2 pre-boot login screen. However, if these functions were enabled using the defaults command, they may show up at the regular login window, but not FileVault 2’s login screen.

Screen Shot 2013-06-18 at 1.01.01 PM

Screen Shot 2013-06-18 at 12.57.48 PM

The answer seems to be that, in addition to running the defaults commands, you also need to remove certain cache filenames ending in .efires from /System/Library/Caches/com.apple.corestorage/EFILoginLocalizations. Clearing the filename.efires cache files forces the system to update the FileVault 2 pre-boot login screen. Whether this update happens right away or when the system reboots is not yet clear; if you know, please let me know in the comments.

For example, running the following commands with root privileges updates the FileVault 2 pre-boot login screen with both the keyboard input menu and a login banner:


defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "My Login Window Text Goes Here"
defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool TRUE
rm /System/Library/Caches/com.apple.corestorage/EFILoginLocalizations/*.efires

On restart, the FileVault 2 pre-boot login screen should look like this, with keyboard input and login text (highlighted in red) now showing.

Screen Shot 2013-06-18 at 1.03.40 PM

To remove these, you would need to boot back into the OS and run the following commands:


defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText
defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool FALSE
rm /System/Library/Caches/com.apple.corestorage/EFILoginLocalizations/*.efires

On restart, the FileVault 2 pre-boot login screen should no longer have either a keyboard input menu or a login banner.

Screen Shot 2013-06-18 at 12.57.48 PM

Hat tip to Josh Schripsema for figuring out that the .efires cache files need to be removed to force the refresh.

UUIDs, LDAP and FileVault 2

June 16, 2013 1 comment

A little-known fact about FileVault 2 is that it uses the GeneratedUID user attribute (also known as a UUID) of an account to help identify enabled accounts. For example, when you run the fdesetup list command, you’ll see the user information appear with both the username and UUID information.

fdesetup_list

For local accounts, this isn’t an issue as the OS will properly generate a UUID for the local account. Active Directory also generally handles this correctly on Macs, so I haven’t seen UUID problems occur for AD mobile users.

Where I have heard of problems has been with non-Apple LDAP servers. If the LDAP server doesn’t provide the GeneratedUID user attribute for mobile LDAP accounts on Macs, or it does not provide the UUID in the way that FileVault 2 is expecting, you may see one or more of the following behaviors:

1. The LDAP account’s icon disappearing from the FileVault 2 pre-boot login screen – This behavior is generally caused by the GeneratedUID attribute not being set for the mobile LDAP account on the Mac. Stack Overflow has a good discussion about this issue that I recommend checking out for more details.

2. The account icon being present, but the password not matching the current password on the LDAP server – This behavior has been observed when the mobile LDAP account’s UUID does not match what FileVault 2 is expecting.

A good example of the latter behavior comes from a Mac admin who recently asked me about the issue he was seeing with passwords not updating. His shop was running an LDAP server as its directory service for its Macs and he had recently added the GeneratedUID user attribute to the accounts on the LDAP server as a fix for accounts disappearing from the FileVault 2 pre-boot login screen. Now, accounts were staying at the FileVault pre-boot login screen, but their passwords were not updating to match what was set on the LDAP server.

In discussing the problem, he mentioned that the UUIDs were using lower-case letters; did that matter? When I followed up on this, he confirmed that instead of his UUIDs looking like this:

7C9AFB0E-E06E-43FA-8E9F-1D410344D2AA

They looked like this:

7c9afb0e-e06e-43fa-8e9f-1d410344d2aa

To the best of my knowledge at the time, alphabetical characters used in Mac UUIDs were all upper-case but I didn’t know for certain that the UUIDs were case-sensitive, so I recommended that he call AppleCare Enterprise support to see if they knew.

After checking with another colleague, who confirmed that Mac account UUIDs were both upper-case and case-sensitive, he changed a test account’s UUID to be all upper-case. At that point, FileVault 2 logins for that account began working properly.

Fixing this issue

If you have an LDAP server and your mobile LDAP accounts aren’t working properly with FileVault 2, here’s what should make FileVault 2 start working properly:

1. On your LDAP server(s), make sure that there’s an apple-generateduid value for your LDAP accounts. If an apple-generateduid value exists in LDAP for a user and is mapped properly to the GeneratedUID attribute on your Macs, FileVault 2 will use the apple-generateduid value stored in LDAP for its UUID.

2. Ensure that all alphabetical characters listed in the the apple-generateduid value are upper-case.

Note: It’s very important that the locally-set UUID value and the value stored in LDAP match exactly. Otherwise, you may see a recurrence of one or both of the undesired behaviors described above

%d bloggers like this: