Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-dev@l.g.o, gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-dev] [PATCH 1/5] targets: Fix enabling PermitRootLogin
Date: Tue, 15 Nov 2022 02:52:14
Message-Id: 20221115025157.1703859-1-mattst88@gentoo.org
1 The default changed to "prohibit-password" many moons ago, so our ISOs
2 would not have allowed root logins if not for net-misc/openssh's
3 IUSE=livecd, which handles this in the ebuild.
4
5 Let's go ahead and fix it, so that we can consider removing openssh's
6 livecd USE flag which would allow us to avoid rebuilding the package for
7 the ISO.
8
9 Signed-off-by: Matt Turner <mattst88@g.o>
10 ---
11 targets/support/livecdfs-update.sh | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14 diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
15 index b7ead552..3f47012b 100755
16 --- a/targets/support/livecdfs-update.sh
17 +++ b/targets/support/livecdfs-update.sh
18 @@ -7,7 +7,8 @@ source /tmp/chroot-functions.sh
19 # Allow root logins to our CD by default
20 if [ -e /etc/ssh/sshd_config ]
21 then
22 - sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
23 + sed -i \
24 + -e '/^#PermitRootLogin/c# Allow root login with password on livecds.\nPermitRootLogin Yes' \
25 /etc/ssh/sshd_config
26 fi
27
28 --
29 2.37.4

Replies