has anyone had any luck encrypting their root partition and unlocking it with a yubikey on boot? im tired of typing in the passphrase on my laptop on boot.

  • sudoer777@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    I investigated this recently and it looks like it’s possible to use Yubikey or TPM, and I think you can add a secondary PIN to that also (but I don’t have the hardware for either yet so haven’t tested it)

  • MalReynolds@piefed.social
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    9 hours ago

    You can just use any USB drive with a couple of kernel parameters. Don’t see what YubiKey is bringing to the table here. If your use case is good with that you can also install pam_usb and not have to type sudo passwords either. Remove the key and (hard if needed) power off and you’re back to a normal secure system. Been doing it for years myself.

    • sudoer777@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      Isn’t the main points of Yubikeys that it’s difficult to access the software keys on it?

      • MalReynolds@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        I guess, looking at https://mhdez.com/posts/unlocking-encrypted-linux-with-a-yubikey/, it seems to still be something you have and something you know (the pin, or in the USB drive case, if you’ve enabled a password as well). OP only mentioned ‘unlocking it with a yubikey’, depends on your use case I guess. My stuff rarely gets into a position where an attacker with physical access is likely, so I prefer convenience, with the option of easily returning to a secure configuration.

  • tapdattl@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    15 hours ago

    Food for thought, but if you’re computer has a TPM you could also use clevis-luks to automatically unlock your root partition at boot.

    • egsaqmojz@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 hours ago

      the issue there, im concerned with folks stealing my whole laptop, not the ssd inside

      • tapdattl@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        11 hours ago

        Well unless you have automatic login enabled, you’d still have to log into your account to access the data on your harddisk, and by using the TPM, if they’re trying to boot into a live environment to bypass your login it won’t decrypt the hard-drive.

        • egsaqmojz@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 hours ago

          fair! i have a very weak password to login though haha. i should probably get my yubikey to log in with too, come to think of it…

          • tapdattl@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            6 hours ago

            Lol valid point, and in my opinion the Yubikey would be better suited for logging in vs. decrypting your hard drive. You could even set it up so that when you remove your yubikey it automatically locks your screen

    • Ooops@feddit.org
      link
      fedilink
      arrow-up
      5
      ·
      20 hours ago

      Note on that guide: using crypttab.initramfs is deprecated. Use the standard crypttab with x-initrd.attach-option instead (although I think it’s not removed yet and still throwing a warning telling you exactly that).

  • eldavi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    20 hours ago

    My cats kept triggering the touch sensor on the yubikey I used to have and I marvel that other people w cats don’t have this problem 😝