From 79bf66b38233f3c38d349cf0c3389b1f57ec9fb6 Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 18:16:01 +0100 Subject: [PATCH 1/6] Add make recipe for wpa supplicant config --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 88acb35..47e5e22 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ root_overlay: root_overlay/etc/door_tokens root_overlay: root_overlay/etc/dropbear/dropbear_ecdsa_host_key root_overlay: root_overlay/root/.ssh/authorized_keys root_overlay: root_overlay/root/key +root_overlay: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub cp ^< $@ @@ -35,6 +36,11 @@ root_overlay/etc/dropbear/dropbear_ecdsa_host_key: mkdir -p `dirname $@` ssh-keygen -t ecdsa -f $@ +root_overlay/etc/wpa_supplicant/wpa_supplicant.conf: + mkdir -p `dirname $@` + @echo "Please enter the passphrase for the space wifi:" + wpa_passphrase Space > $@ + clean: make -C buildroot clean rm -f sdcard.img From 4601787c15d77ef121c17aa7bc5a4192fc377b2e Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 18:19:04 +0100 Subject: [PATCH 2/6] Fix order --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 47e5e22..3acd69a 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,9 @@ sdcard.img: buildroot/.config root_overlay: root_overlay/bin/test.py root_overlay: root_overlay/etc/door_tokens root_overlay: root_overlay/etc/dropbear/dropbear_ecdsa_host_key +root_overlay: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf root_overlay: root_overlay/root/.ssh/authorized_keys root_overlay: root_overlay/root/key -root_overlay: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub cp ^< $@ From 3ba7668c360d9d7f808753cdf536341a7f78e26a Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 19:28:59 +0100 Subject: [PATCH 3/6] Add wpa supplicant to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8fe9fcf..7d8912e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /root_overlay/root/key /root_overlay/bin/test.py /root_overlay/bin/poll_desfire +/root_overlay/etc/wpa_supplicant From ff54f9279db0cb213d28fdc6b1fbcd1862d961fd Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 19:30:35 +0100 Subject: [PATCH 4/6] ssh stuff --- .gitignore | 1 + Makefile | 1 + root_overlay/root/.ssh/authorized_keys | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 root_overlay/root/.ssh/authorized_keys diff --git a/.gitignore b/.gitignore index 7d8912e..2fc4603 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /root_overlay/bin/test.py /root_overlay/bin/poll_desfire /root_overlay/etc/wpa_supplicant +/root_overlay/root/.ssh/authorized_keys diff --git a/Makefile b/Makefile index 3acd69a..03bfbef 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ root_overlay: root_overlay/root/.ssh/authorized_keys root_overlay: root_overlay/root/key root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub + mkdir -p `dirname $@` cp ^< $@ buildroot/.config: config diff --git a/root_overlay/root/.ssh/authorized_keys b/root_overlay/root/.ssh/authorized_keys deleted file mode 100644 index 34a6e24..0000000 --- a/root_overlay/root/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5pAEc3dFnR7zDtdIaH3ICBQincnxs7HlIi+JEfl3M23S/wkQASE9hDpNwAF/CRu9u2cjnXgHNqVG0TkKyjWgfXk9tTpyVBNw8QkHQ75TpbKsuhWQm/LgYb874j4+2pDGxLLdVVuY1c73vNQqkHL0xS3aG/dtvCc7XMNg5VRWdwL3WPhkmuBQK7JYUkUnf+dZWS91oJWZHd/OEU/H9p147UGw3ffLQ9H+IKxl3pvEMKz8Aeca1sDtSS0Z2LXzh3au5KynMR6KHBX9QUM3Bkoy20QqnNZz/sQX04NrOigoPDOFRlOaeIXeZvecZRP7LnTy7JviWFylMwziwzEJslDLN apo@mae From 2369265b275eb9e3c56508e204a7776c23859e4b Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 19:34:06 +0100 Subject: [PATCH 5/6] Typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 03bfbef..85017d1 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ root_overlay: root_overlay/root/key root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub mkdir -p `dirname $@` - cp ^< $@ + cp $< $@ buildroot/.config: config ln -sf ../config $@ From 0035039ed6ba7a40360c83bf4adefdc85347d00b Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 19:34:13 +0100 Subject: [PATCH 6/6] Forbid root login with password --- config | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config b/config index ec5d11a..ecbb1eb 100644 --- a/config +++ b/config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2021.02-rc2-dirty Configuration +# Buildroot 2021.02-rc2 Configuration # BR2_HAVE_DOT_CONFIG=y BR2_EXTERNAL_DOOR_PI_PATH="/home/apo/Projects/Hackerspace/DoorPi/br_external" @@ -445,9 +445,9 @@ BR2_ROOTFS_SKELETON_DEFAULT=y # BR2_ROOTFS_SKELETON_CUSTOM is not set BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero" BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero" -BR2_TARGET_GENERIC_PASSWD_SHA256=y -# BR2_TARGET_GENERIC_PASSWD_SHA512 is not set -BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256" +# BR2_TARGET_GENERIC_PASSWD_SHA256 is not set +BR2_TARGET_GENERIC_PASSWD_SHA512=y +BR2_TARGET_GENERIC_PASSWD_METHOD="sha-512" BR2_INIT_BUSYBOX=y # BR2_INIT_SYSV is not set # BR2_INIT_OPENRC is not set @@ -463,8 +463,7 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt" # BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is not set # BR2_ROOTFS_MERGED_USR is not set -BR2_TARGET_ENABLE_ROOT_LOGIN=y -BR2_TARGET_GENERIC_ROOT_PASSWD="hello" +# BR2_TARGET_ENABLE_ROOT_LOGIN is not set BR2_SYSTEM_BIN_SH_BUSYBOX=y # BR2_SYSTEM_BIN_SH_BASH is not set # BR2_SYSTEM_BIN_SH_DASH is not set