From 8d2367a60f16b7f0dff7fd8691ccb70e47afad64 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 14 Dec 2018 22:54:11 +0100 Subject: [PATCH] Fix "Login attempt with nonexistent user" As there is no passwd / group file existent in the ramdisk, loging in the root user isn't possible and it will fail with the message from above. This commit fixes the issue by adding the root user / group using groupadd and useradd tools. I recommend to use these tools, because they only will add an additional line if the user / group doesn't exist already. --- dropbear_install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dropbear_install b/dropbear_install index 40a5116..615f741 100644 --- a/dropbear_install +++ b/dropbear_install @@ -86,6 +86,9 @@ build () add_dir "/root/.ssh" cat /etc/dropbear/root_key > "${BUILDROOT}"/root/.ssh/authorized_keys + groupadd --prefix "${BUILDROOT}" --system -g 0 root + useradd --prefix "${BUILDROOT}" --system -g root -u 0 -M -d /root -s /bin/sh root + add_full_dir "/etc/dropbear" add_file "/lib/libnss_files.so.2" add_dir "/var/run"