15
submitted 5 months ago* (last edited 5 months ago) by electro1@infosec.pub to c/linuxquestions@lemmy.zip

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

you are viewing a single comment's thread
view the rest of the comments
[-] scsi@lemm.ee 5 points 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 (c) accept input from STDIN with the standard use of - on the end (e.g. echo "mypass" | cryptsetup luksChangeKey /dev/sda - )

this post was submitted on 01 Jun 2024
15 points (100.0% liked)

Linux Questions

1060 readers
1 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 1 year ago
MODERATORS