From c26cb0c3c714d270205358324bfc7a64e71be415 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 23 Jul 2022 18:50:48 +0200 Subject: [PATCH 1/3] Remove default sshd banner --- stage3/00-install-yunohost/00-run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stage3/00-install-yunohost/00-run.sh b/stage3/00-install-yunohost/00-run.sh index 493e9b6..b4d8c70 100755 --- a/stage3/00-install-yunohost/00-run.sh +++ b/stage3/00-install-yunohost/00-run.sh @@ -46,6 +46,10 @@ sed -i '/PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config echo "root:yunohost" | chpasswd EOF +echo "Removing Raspbian sshd banner" +rm /etc/ssh/sshd_config.d/rename_user.conf +rm /usr/share/userconf-pi/sshd_banner + install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/" echo "Cleaning ..." @@ -77,4 +81,4 @@ do sleep 1 done sleep 5 -done \ No newline at end of file +done From 61fb4124dd1e429e35f434aae1d346544ff195bd Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Sat, 23 Jul 2022 20:04:13 +0200 Subject: [PATCH 2/3] Don't fail if banner files was not here --- stage3/00-install-yunohost/00-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stage3/00-install-yunohost/00-run.sh b/stage3/00-install-yunohost/00-run.sh index b4d8c70..1f081ca 100755 --- a/stage3/00-install-yunohost/00-run.sh +++ b/stage3/00-install-yunohost/00-run.sh @@ -47,8 +47,8 @@ echo "root:yunohost" | chpasswd EOF echo "Removing Raspbian sshd banner" -rm /etc/ssh/sshd_config.d/rename_user.conf -rm /usr/share/userconf-pi/sshd_banner +rm -f /etc/ssh/sshd_config.d/rename_user.conf +rm -f /usr/share/userconf-pi/sshd_banner install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/" From 457bf5b27322882900543691649ca5ca2ef2dfac Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 24 Jul 2022 01:15:10 +0200 Subject: [PATCH 3/3] Update removal of the sshd banner : command should apply to files inside the rootfs --- stage3/00-install-yunohost/00-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stage3/00-install-yunohost/00-run.sh b/stage3/00-install-yunohost/00-run.sh index 1f081ca..e3cd4ca 100755 --- a/stage3/00-install-yunohost/00-run.sh +++ b/stage3/00-install-yunohost/00-run.sh @@ -47,8 +47,8 @@ echo "root:yunohost" | chpasswd EOF echo "Removing Raspbian sshd banner" -rm -f /etc/ssh/sshd_config.d/rename_user.conf -rm -f /usr/share/userconf-pi/sshd_banner +rm -f "${ROOTFS_DIR}/etc/ssh/sshd_config.d/rename_user.conf" +rm -f "${ROOTFS_DIR}/usr/share/userconf-pi/sshd_banner" install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/"