Cannot change APFS encryption password
You need to list your disks to find the APFS volume disk where you want to change the password:

sudo diskutil apfs list


Now find the UUID of the cryptographic Disk User:

sudo diskutil apfs listUsers &lt;your APFS volume, like: disk1s1&gt;


Finally you can change the APFS volume password:

sudo diskutil apfs changePassphrase &lt;your APFS volume, like: disk1s1&gt; -user &lt;the Disk User cryptographic UUID, like: 12345678-1234-1234-1234567890AB&gt;