I have a long, complicated password for an external drive encrypted with FileVault that I have securely stored, but OS X doesn’t allow pasting into the password unlock GUI dialog (argh!). How can I unlock it via the terminal so I can paste the password in there?

up vote 7 down vote accepted

Beginning with OS X 10.11 “El Capitan”, you can now paste into the GUI unlock dialog! If you’re using an older OS X (or just want to use the command-line to unlock), read on.


The diskutil command is for working with volumes via the terminal in OS X.

  • First, find the UUID for your drive via diskutil list. You should see a section like this:

    Logical Volume MyAwesomeDrive on disk2s2
    96EC217A-54F2-49A3-8471-9BFE535D159A
    Locked Encrypted
    

    Where “MyAwesomeDrive” is the volume name, and “96EC217A-54F2-49A3-8471-9BFE535D159A” is the UUID we’re looking for.

  • Run diskutil coreStorage unlockVolume <uuid>, replacing <uuid> with the UUID found above. It will prompt for your password (which can be pasted in) and unlock the encrypted volume.

Note: If you’re typing/pasting passwords or other secure information into the terminal, it would be wise to enable “Secure Keyboard Entry” in the Terminal app menu (also available in iTerm). Read more on security.se.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.