From de758c03f58c8a2b3284593911a0efad4a09c61b Mon Sep 17 00:00:00 2001 From: Juri Grabowski Date: Sat, 2 Oct 2021 10:25:02 +0200 Subject: [PATCH 1/2] New Version of ssh allow config in subfolder --- bin/fai-make-nfsroot | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/fai-make-nfsroot b/bin/fai-make-nfsroot index 735a3f763..adb3a243c 100755 --- a/bin/fai-make-nfsroot +++ b/bin/fai-make-nfsroot @@ -223,8 +223,7 @@ setup_ssh() { [ -f $NFSROOT/usr/bin/ssh ] || return 0 # enable root login - sed -i -e '/PermitRootLogin/d' $NFSROOT/etc/ssh/sshd_config - ainsl $NFSROOT/etc/ssh/sshd_config 'PermitRootLogin yes' + ainsl $NFSROOT/etc/ssh/sshd_config.d/PermitRootLogin.conf 'PermitRootLogin yes' if [ $sshpreserve -ge 1 ]; then tar -C $NFSROOT -xf $tmptar From aec5c8d002f1d4666f31b0b07e7f4b544b05b883 Mon Sep 17 00:00:00 2001 From: Juri Grabowski Date: Sun, 3 Oct 2021 09:37:46 +0200 Subject: [PATCH 2/2] create if not exist --- bin/fai-make-nfsroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fai-make-nfsroot b/bin/fai-make-nfsroot index adb3a243c..8e13c8948 100755 --- a/bin/fai-make-nfsroot +++ b/bin/fai-make-nfsroot @@ -223,7 +223,7 @@ setup_ssh() { [ -f $NFSROOT/usr/bin/ssh ] || return 0 # enable root login - ainsl $NFSROOT/etc/ssh/sshd_config.d/PermitRootLogin.conf 'PermitRootLogin yes' + ainsl -a $NFSROOT/etc/ssh/sshd_config.d/PermitRootLogin.conf 'PermitRootLogin yes' if [ $sshpreserve -ge 1 ]; then tar -C $NFSROOT -xf $tmptar