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
2
  • 2
    Did you find an answer to your question? I would like to do the exact same thing, but I have only been able to find posts/questions explaining how to auto-mount encrypted disk, or something similar. Commented Mar 18, 2015 at 20:57
  • 2
    related question here Commented Aug 17, 2018 at 18:08

1 Answer 1

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."

3
  • 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
    Commented Jun 19, 2019 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
    Commented Aug 9, 2020 at 14:40
  • 1
    Per this: superuser.com/questions/1625494/… it is hardcoded, if you know better, what is the name of the schema key? Commented Dec 1, 2022 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .