Public bug reported:
Dropbear initramfs hook copies `/etc/initramfs-
tools/root/.ssh/authorized_keys` into initramfs for passwordless login
during boot.
The script responsible is `/usr/share/initramfs-tools/hooks/dropbear`.
The destination folder is set at line 37:
`home=$(mktemp -d "$DESTDIR/root-XX")`
which ends up creating a temp directory in initramfs file, similar to
`/root-hZQ48a`, instead of `/root`. Dropbear fails to find
`/root/.ssh/authorized_keys` at boot and does not allow remote logins.
See the contents of a generated initrd with:
`cd `mktemp -d` && gzip -dc /boot/initrd.img-`uname -r` | cpio -ivd`
Setting the $home variable with the following lines should solve the issue:
```
home="$DESTDIR/root"
mkdir -p $home
```
** Affects: dropbear (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/164
Title:
Dropbear initramfs hook creates authorized_keys file in an invalid
folder
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/164/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs