0

Unfortunately my drive unlocks automatically. This makes the whole encryption useless. How do I turn off this annoying feature on a specified drive (e.g. /dev/x) ?

The cryptsetup command I've found is not documented. I'm afraid this could erase the whole drive!

cryptsetup luksRemoveKey /dev/x

enter image description here

  • I'm wondering how on earth can a drive get locked while it is mounted - it is bound for a disaster. Anyway, GNOME Disks (which is a front end to udisk) should have some sort of settings available for tweaking. – peterph Apr 26 '13 at 18:45
4

LUKS doesn't “auto-unlock” a volume. The volume becomes accessible when you open it, which requires the key. The volume remains inaccessible when you close it; you can only close it when it is not in use, so you must close any open file and unmount the filesystem.

cryptsetup luksRemoveKey would remove the key from the volume, which would make it unreadable. Don't do this. The unlocking isn't happening because of LUKS, but because a program is calling cryptsetup luksOpen. You need to avoid storing your key in that program.

It looks like you have a keyring application that has recorded the key for the volume, specifically gnome-keyring. Remove the key from the keyring. You can manipulate your keyring with Seahorse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.