From 9a403f8aeec54ff798d839ee4be3b6886f969274 Mon Sep 17 00:00:00 2001
From: Old openssh patches <pcerny@suse.com>
Date: Tue, 25 Oct 2022 18:52:46 +0200
Subject: [PATCH] openssh-7.2p2-allow_root_password_login

# HG changeset patch
# Parent  c43ae523939377778762e81743b77b3c75eb4bd1
Allow root login with password by default. While less secure than upstream
default of forbidding access to the root account with a password, we are
temporarily introducing this change to keep the default used in older OpenSSH
versions shipped with SLE.
---
 servconf.c    | 2 +-
 sshd_config   | 2 +-
 sshd_config.0 | 2 +-
 sshd_config.5 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/servconf.c b/servconf.c
index b19d30e1..5b16c32a 100644
--- a/servconf.c
+++ b/servconf.c
@@ -238,7 +238,7 @@ fill_default_server_options(ServerOptions *options)
 	if (options->key_regeneration_time == -1)
 		options->key_regeneration_time = 3600;
 	if (options->permit_root_login == PERMIT_NOT_SET)
-		options->permit_root_login = PERMIT_NO_PASSWD;
+		options->permit_root_login = PERMIT_YES;
 	if (options->ignore_rhosts == -1)
 		options->ignore_rhosts = 1;
 	if (options->ignore_user_known_hosts == -1)
diff --git a/sshd_config b/sshd_config
index a848d73e..751d3897 100644
--- a/sshd_config
+++ b/sshd_config
@@ -41,7 +41,7 @@
 # Authentication:
 
 #LoginGraceTime 2m
-#PermitRootLogin prohibit-password
+#PermitRootLogin yes
 #StrictModes yes
 #MaxAuthTries 6
 #MaxSessions 10
diff --git a/sshd_config.0 b/sshd_config.0
index 8bda6a39..7b5b29ed 100644
--- a/sshd_config.0
+++ b/sshd_config.0
@@ -715,7 +715,7 @@ DESCRIPTION
              Specifies whether root can log in using ssh(1).  The argument
              must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\prohibit-passwordM-bM-^@M-^], M-bM-^@M-^\without-passwordM-bM-^@M-^],
              M-bM-^@M-^\forced-commands-onlyM-bM-^@M-^], or M-bM-^@M-^\noM-bM-^@M-^].  The default is
-             M-bM-^@M-^\prohibit-passwordM-bM-^@M-^].
+             M-bM-^@M-^\yesM-bM-^@M-^].
 
              If this option is set to M-bM-^@M-^\prohibit-passwordM-bM-^@M-^] or
              M-bM-^@M-^\without-passwordM-bM-^@M-^], password and keyboard-interactive
diff --git a/sshd_config.5 b/sshd_config.5
index a37a3aca..b2c50b25 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -1218,7 +1218,7 @@ The argument must be
 or
 .Dq no .
 The default is
-.Dq prohibit-password .
+.Dq yes .
 .Pp
 If this option is set to
 .Dq prohibit-password
-- 
2.38.0

