45

When a LUKS encrypted partition pops up the unlock window it gives 3 options for how to remember the password. The "Remember password until you logout" is always ticked by default. Is there a way to make "Forget password immediately" the default?

Enter a passphrase to unlock the volume:

[ ] Forget password immediately
[x] Remember password until you logout
[ ] Remember forever
NMukama
  • 356
user308393
  • 1,297

1 Answers1

0

I believe the setting comes from your desktop environment, e.g. GNOME. Not related to LUKS or the encryption.

If GNOME is your desktop environment, you should change GNOME settings. One way is to install dconf-editor by

sudo apt install dconf-editor

You might be able to find the relevant default setting there.

Edited I am editting this message as per recommendations provided by felinira (see replies to this message):

For modern versions of gnome (everything from the last decade) you should use dconf-editor instead. The key is org.gnome.shell.remember-mount-password. From the description: "The shell will request a password when an encrypted device or a remote filesystem is mounted. If the password can be saved for future use a “Remember Password” checkbox will be present. This key sets the default state of the checkbox."

  • 9
    For modern versions of gnome (everything from the last decade) you should use dconf-editor instead. The key is org.gnome.shell.remember-mount-password. From the description: "The shell will request a password when an encrypted device or a remote filesystem is mounted. If the password can be saved for future use a “Remember Password” checkbox will be present. This key sets the default state of the checkbox." – felinira Jun 19 '19 at 18:05
  • 2
    @felinira I'm on Arch linux with some gnome services, but that key is not present in my case. Even though I still have the dialog when mounting my LUKS drives. I figure I could probably add the key, but can't find any information to do so. – akovia Aug 09 '20 at 14:40
  • 1
    Per this: https://superuser.com/questions/1625494/how-to-default-nemo-to-forget-luks-password it is hardcoded, if you know better, what is the name of the schema key? – Alex Martian Dec 01 '22 at 09:06