I tried the following

sudo cryptsetup luksChangekey /dev/nvme0n1p3 < new passphrase > 

It then asks for the Sudo password, then asks for the old passphrase, but then it prints this error message

Failed to open key file.

what went wrong ?

Edit: turns out using GNOME Disks is way more straightforward… 😅, thank you all

  • scsi@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 months ago

    Refer to the cryptsetup-luksChangeKey man page --key-file options, you cannot change the password directly on a commandline; you either (a) type it interactively, (b) put it in a keyfile, or © accept input from STDIN with the standard use of - on the end (e.g. echo "mypass" | cryptsetup luksChangeKey /dev/sda - )