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

  • 乇ㄥ乇¢ㄒ尺ㄖ@infosec.pubOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    It asks for the sudo password, then it prints

    No usable token is available.
    

    Then it asks : Enter passphrase for /dev/nvme0n1p3:

    After entering my old passphrase it prints:

    Key slot 0 unlocked
    Command Successful.
    
    • booooop [any]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      Alright so no permission issue, what if you run the changekey command in a separate bash subprocess? sudo bash -c '($your-changekey-command-here)'

      • 乇ㄥ乇¢ㄒ尺ㄖ@infosec.pubOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 months ago

        Is it like the same first “cryptsetup luksChangekey…” But inside parentheses ? Im sure I’m getting the syntax wrong… It prints

        bash: line 1: -luksChangekey: command not found