Don't create a duplicate root user when dropbear-initramfs installed#1
Don't create a duplicate root user when dropbear-initramfs installed#1lugoues merged 3 commits intolugoues:mainfrom
Conversation
|
I had the same problem. |
|
I wonder if your suggested approach still allows tailscale-initramfs to create the user if it happens to run first? |
|
Should be fine, but I did not test it. |
Co-authored-by: Marek Schütze <marek-schuetze@mail.de>
|
Thanks y'all for the contribution! Sorry this took so long |
|
@lugoues I had this same issue, then found this fix is not part of the |
Oh god I'm dumb, sorry about that. I'll update that tomorrow. |
v0.4 has been released |
Without this check, it's not possible to use dropbear-initramfs, even if you don't request the tailscale ssh support (using --ssh when setting up). Two root user directories get created, and it's random which ends up being the one used depending on which order the initramfs hooks execute. This means that although dropbear fires up as the ssh server, it doesn't have access to its authorized_keys file.
I've just changed the tailscale initramfs hook here to skip over creating a root user home directory if dropbear-initramfs is installed. It still redundantly creates it if the --ssh option wasn't specified when doing the initial setup, but I guess that's ok.