Change APFS Volume Password on the Command Line
Date: 2022-08-09
categories:
command-line;
The Disk Utility on macOS doesn't provide a way (that I could find) to change the password on a FileVault-locked volume, so I had to use the command line. Recording the instructions here for the next time.
Warning: you should have a backup of any data you care about.
sudo diskutil apfs list
# Find your disk in the list, something like disk3s1, use in command below
sudo diskutil apfs listUsers disk{x}s{y}
# For me this was "Disk User", and you'll need the GUID
sudo diskutil apfs changePassphrase disk{x}s{y} -user {userGuid}
- Test that you can un/mount with the new password.
- Keep your new password someplace safe!