Skip to content

Instantly share code, notes, and snippets.

@aromig
Last active April 10, 2017 17:03
Show Gist options
  • Save aromig/354737529b95e0b15b8e to your computer and use it in GitHub Desktop.
Save aromig/354737529b95e0b15b8e to your computer and use it in GitHub Desktop.
# Enable a user to unlock FileVault2 drive
sudo fdesetup add -usertoadd <username>
# Disable a user from unlocking FileVault 2 drive
sudo fdesetup remove -user <username>
# Unlocking FileVault2 drive
diskutil cs list
diskutil cs unlockVolume <UUID_of_Logical_Volume> -stdinpassphrase
# Decrypt FileVault2 drive
diskutil cs list
# Copy the UUID of Logical Volume for next step
# Make sure it's the UUID of Logical Volume (last in tree), not Logical Volume Group or Family
diskutil cs revert <UUID of Logical Volume> -stdinpassphrase
# You will need ot manually enter the password for unlocking the volume.
# Erasing a FileVault2 disk
diskutil cs list
# Copy the UUID of Logical Volume Group for next step
diskutil cs delete <UUID of Logical Volume Group>
# Check FileVault Conversion Status (% encrypting/decrypting)
fdesetup status
# or
diskutil cs list | grep "Conversion"
# or
while true; do diskutil cs list | grep “Conversion Progress” ; sleep 10; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment