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.

  • lemmyreader@lemmy.ml
    ·
    5 months ago

    Several Display Managers support auto login. For example :

    • gdm : https://wiki.archlinux.org/title/GDM#Automatic_login
    • lightdm : https://wiki.archlinux.org/title/LightDM#Enabling_autologin
    • Epzillon@lemmy.ml
      hexagon
      ·
      5 months ago

      Thank you very much. The DM setting where shuffled a bit in Plasma 6, but I managed to find it under SDDM > Behaviour.

  • The Hobbyist@lemmy.zip
    ·
    edit-2
    5 months ago

    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

    • Epzillon@lemmy.ml
      hexagon
      ·
      5 months ago

      This is a unique and pretty cool solution. I might look into it if I have issues with auto-login 👍

  • zarenki@lemmy.ml
    ·
    5 months ago

    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.

  • Jediwan@lemy.lol
    ·
    5 months ago

    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@lemmy.ml
    ·
    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; 
    
  • StrangeAstronomer@lemmy.ml
    ·
    5 months ago

    Another approach entirely is to use pam_mount(8) which can automatically mount a disc on login. I use it to mount /home/$USER (obviously this couldn't be used to mount the root fs !!)