From 23dc2374037896f7b6e7aa296f8fb7e01ac47f2f Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 5 May 2024 18:48:13 +0200 Subject: [PATCH] Switch to PAM for system authentication - Add sshd 'UsePAM yes' - Buildroot automatically adds and enables: - /etc/pam.d/ with authentication for login, sshd, and sudo - PAM support in BusyBox login Also, prepare for adding RADIUS authentication support to ietf-system the only tricky part is testing against a RADIUS server. Signed-off-by: Joachim Wiberg --- board/common/rootfs/etc/ssh/sshd_config.d/auth.conf | 1 + configs/aarch64_defconfig | 2 ++ configs/r2s_defconfig | 2 ++ configs/x86_64_defconfig | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 board/common/rootfs/etc/ssh/sshd_config.d/auth.conf diff --git a/board/common/rootfs/etc/ssh/sshd_config.d/auth.conf b/board/common/rootfs/etc/ssh/sshd_config.d/auth.conf new file mode 100644 index 00000000..6ac35e31 --- /dev/null +++ b/board/common/rootfs/etc/ssh/sshd_config.d/auth.conf @@ -0,0 +1 @@ +UsePAM yes diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index b25df30a..845da068 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -62,6 +62,8 @@ BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y BR2_PACKAGE_NETOPEER2_CLI=y BR2_PACKAGE_NSS_MDNS=y +BR2_PACKAGE_LINUX_PAM=y +BR2_PACKAGE_LIBPAM_RADIUS_AUTH=y BR2_PACKAGE_ONIGURUMA=y BR2_PACKAGE_AVAHI=y BR2_PACKAGE_AVAHI_DAEMON=y diff --git a/configs/r2s_defconfig b/configs/r2s_defconfig index 4ea92309..9f1e1e2d 100644 --- a/configs/r2s_defconfig +++ b/configs/r2s_defconfig @@ -73,6 +73,8 @@ BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y BR2_PACKAGE_NETOPEER2_CLI=y BR2_PACKAGE_NSS_MDNS=y +BR2_PACKAGE_LINUX_PAM=y +BR2_PACKAGE_LIBPAM_RADIUS_AUTH=y BR2_PACKAGE_ONIGURUMA=y BR2_PACKAGE_AVAHI=y BR2_PACKAGE_AVAHI_DAEMON=y diff --git a/configs/x86_64_defconfig b/configs/x86_64_defconfig index 28ea0a05..f92a9413 100644 --- a/configs/x86_64_defconfig +++ b/configs/x86_64_defconfig @@ -57,6 +57,8 @@ BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y BR2_PACKAGE_NETOPEER2_CLI=y BR2_PACKAGE_NSS_MDNS=y +BR2_PACKAGE_LINUX_PAM=y +BR2_PACKAGE_LIBPAM_RADIUS_AUTH=y BR2_PACKAGE_ONIGURUMA=y BR2_PACKAGE_AVAHI=y BR2_PACKAGE_AVAHI_DAEMON=y