From cc9ac5cd3610928e9a483d0571f113ca2270fd65 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 19 Jul 2020 16:30:37 +0200 Subject: [PATCH] Added automatic root password --- build.sh | 1 + buildroot/configs/pcengines_apu2_defconfig | 2 ++ webpanel/includes/config.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index e3289ae..0731040 100755 --- a/build.sh +++ b/build.sh @@ -32,6 +32,7 @@ chmod 400 target/overlay/root/flag echo "[+] Adding customization files" cp -R buildroot/* target/buildroot # copy buildroot configs +sed -i "s/###ROOTPASSWORD###/$password/g" target/buildroot/configs/pcengines_apu2_defconfig cp -R conf/* target/overlay # copy target system config files cp -R webpanel/* target/overlay/var/www/html # copy the webpanel cp -R update/update.sh target/overlay #copy the update script and certificate diff --git a/buildroot/configs/pcengines_apu2_defconfig b/buildroot/configs/pcengines_apu2_defconfig index 89cdd70..53ff3f3 100644 --- a/buildroot/configs/pcengines_apu2_defconfig +++ b/buildroot/configs/pcengines_apu2_defconfig @@ -5,6 +5,8 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y BR2_TARGET_GENERIC_HOSTNAME="cros" BR2_TARGET_GENERIC_ISSUE="1337 Linux" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_ENABLE_ROOT_LOGIN=y +BR2_TARGET_GENERIC_ROOT_PASSWD="###ROOTPASSWORD###" BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_OVERLAY="../overlay" BR2_LINUX_KERNEL=y diff --git a/webpanel/includes/config.php b/webpanel/includes/config.php index 39bf6c8..0462321 100644 --- a/webpanel/includes/config.php +++ b/webpanel/includes/config.php @@ -1,6 +1,6 @@ ');