Hello everyone!

I daily drive a Nobara install with my main drive being an LUKS encrypted M.2 drive. Every time I boot my computer I get presented with the password prompt to unlock the drive and afterwards get prompted with my login manager to login.

Is there any way to combine these steps into a single prompt? It is starting to get a bit annoying having two steps every time I boot.

      • Be aware that kwallet will require you to enter your password if you auto-login. Kwallet usually saves your passwords for wifi etc. That’s why auto-login with KDE doesn’t make much of a difference in most use cases

        • Can you configure KWallet with no password? Often you can do something like set an empty password and it will auto-decrypt with no prompt.

          This may be undesirable as apps running in your user can access what is in KWallet but honestly this is probably the case anyways. If you are running unsandboxed untrusted applications you have already lost.

        •  Epzillon   ( @Epzillon@lemmy.ml ) OP
          link
          fedilink
          1
          edit-2
          5 months ago

          This is fine for my use case. I don run wifi on my gaming rig but I guess I’ll see if any other things prompt me for password after logging in next time.

          Edit: Nope, I have no clue what is even possibly stored in Kwallet, if anything, but it still pops up and requests password. Ironically i went from typing my password 2 times to 3 times by enabling auto-login. I know have to unlock the keyring once I login, and then unlock Kwallet once I try to launch Discord. We love it.

  • There is a way to place the secret file (corresponding to the password) on a dedicated USB stick and have a script attempt to Mount it at boot to unlock the partition. If the USB stick is not found, it will revert to the password prompt. Perhaps this is the best of both?

    Make sure not to leave the USB stick plugged in, but rather only take it and and plug it in to boot then safely store it once booted, otherwise you are probably defeating the purpose of having an encrypted partition to begin with.

    I’ll add a link to read more about it shortly.

    Edit: here is one example to set it up (including to auto-decrypt ZFS) https://www.youtube.com/watch?v=7xOLxCwdi-I

    • I do this, along with pamusb, so I don’t need a password for sudo etc. (which allows a longer more secure password than I might otherwise use). Depending on the threat model, I think it’s fine to just leave it in. One day I’ll get it to shutdown --now on ripping out the key drive without dismounting first, sort of a break glass in emergency thing. Same thing can be achieved with pulling the key and holding the power button though (even if it’s a bit rude to the filesystem)

  • I tried to do this a while ago with a GNOME system, setting GDM to automatically log me in, but I ended up always getting prompted for my password from gnome-keyring shortly after logging in which seemed to defeat the point. If you use GNOME, you might want to look at ArchWiki’s gnome-keyring page which describes a couple solutions to this problem (under the PAM section) which should be applicable on any systemd distro.

  • I asked this a while back and was told I am an idiot for asking and it is astonishing I am able to even use a computer, which I clearly am not responsible enough to use.

    Just kidding (not really) but consensus was “not very easily”. I tried a few methods which were complicated and didn’t manage to work. Yes, Windows and MacOS do this seamlessly, but nobody has yet taken the time to add a similar functionality to Linux.

  •  kevincox   ( @kevincox@lemmy.ml ) 
    link
    fedilink
    1
    edit-2
    5 months ago

    On NixOS I did this:

    services.displayManager.autoLogin = {
    	enable = true;
    	user = "kevincox";
    };
    
    # Avoid setting up a keyring every time I do a non-auto login.
    # https://gitlab.gnome.org/GNOME/seahorse/-/issues/159
    security.pam.services.login.enableGnomeKeyring = lib.mkForce false;