You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
4.2 KiB
99 lines
4.2 KiB
From 9c7f40e7edae3475be9a0b8afd7b390a7ad3bfbc Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
Date: Mon, 12 Jul 2021 13:47:12 +0200
|
|
Subject: [PATCH] switch from authconfig to authselect
|
|
|
|
Authconfig compatibility tool (from authselect-compat) will be removed from Fedora 35:
|
|
https://fedoraproject.org/wiki/Changes/RemoveAuthselectCompatPackage
|
|
---
|
|
config/livecd-fedora-minimal.ks | 2 +-
|
|
config/livecd-mageia-minimal-i586.ks | 2 +-
|
|
config/livecd-mageia-minimal-x86_64.ks | 2 +-
|
|
imgcreate/creator.py | 2 +-
|
|
imgcreate/kickstart.py | 13 ++++++-------
|
|
5 files changed, 10 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/config/livecd-fedora-minimal.ks b/config/livecd-fedora-minimal.ks
|
|
index aeb1b046f0f602a07c3c4d0ee0685d460d4838ad..6aec2107041755291228178ec6ed5686f7fc5477 100644
|
|
--- a/config/livecd-fedora-minimal.ks
|
|
+++ b/config/livecd-fedora-minimal.ks
|
|
@@ -1,7 +1,7 @@
|
|
lang en_US.UTF-8
|
|
keyboard us
|
|
timezone US/Eastern
|
|
-auth --useshadow --passalgo=sha512
|
|
+authselect select sssd with-silent-lastlog --force
|
|
selinux --enforcing
|
|
firewall --disabled
|
|
part / --size 2048
|
|
diff --git a/config/livecd-mageia-minimal-i586.ks b/config/livecd-mageia-minimal-i586.ks
|
|
index 0b7e239977905d5c23c3ae05054fbe320eabbffb..12e6c65de7c1cf2d3e31f413abf4981a0dac7fe6 100644
|
|
--- a/config/livecd-mageia-minimal-i586.ks
|
|
+++ b/config/livecd-mageia-minimal-i586.ks
|
|
@@ -1,7 +1,7 @@
|
|
lang en_US.UTF-8
|
|
keyboard us
|
|
timezone US/Eastern
|
|
-auth --useshadow --passalgo=sha512
|
|
+authselect select sssd with-silent-lastlog --force
|
|
selinux --disabled
|
|
firewall --disabled
|
|
part / --size 1536
|
|
diff --git a/config/livecd-mageia-minimal-x86_64.ks b/config/livecd-mageia-minimal-x86_64.ks
|
|
index 19e6273e82efa41edd6fb72c32aa36fc51a8cbdb..defb9e036bc97182ff3617c4dfd51eea09cc92f9 100644
|
|
--- a/config/livecd-mageia-minimal-x86_64.ks
|
|
+++ b/config/livecd-mageia-minimal-x86_64.ks
|
|
@@ -1,7 +1,7 @@
|
|
lang en_US.UTF-8
|
|
keyboard us
|
|
timezone US/Eastern
|
|
-auth --useshadow --passalgo=sha512
|
|
+authselect select sssd with-silent-lastlog --force
|
|
selinux --disabled
|
|
firewall --disabled
|
|
part / --size 1536
|
|
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
|
|
index 692d2873bd51e61ff4945ac9d7e980a3255a399e..654edcb5ec7c19360e5ba9fbd1cd0a780b2f9a1d 100644
|
|
--- a/imgcreate/creator.py
|
|
+++ b/imgcreate/creator.py
|
|
@@ -788,7 +788,7 @@ class ImageCreator(object):
|
|
kickstart.LanguageConfig(self._instroot).apply(ksh.lang)
|
|
kickstart.KeyboardConfig(self._instroot).apply(ksh.keyboard)
|
|
kickstart.TimezoneConfig(self._instroot).apply(ksh.timezone)
|
|
- kickstart.AuthConfig(self._instroot).apply(ksh.authconfig)
|
|
+ kickstart.AuthSelect(self._instroot).apply(ksh.authselect)
|
|
kickstart.FirewallConfig(self._instroot).apply(ksh.firewall)
|
|
kickstart.RootPasswordConfig(self._instroot).apply(ksh.rootpw)
|
|
kickstart.ServicesConfig(self._instroot).apply(ksh.services)
|
|
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
|
|
index 526a2028d2a9b32fa6b02dc32af8f4912919ea2f..afb8bfefb4bd9c20a2f45788fc2f0dccd4842c38 100644
|
|
--- a/imgcreate/kickstart.py
|
|
+++ b/imgcreate/kickstart.py
|
|
@@ -179,17 +179,16 @@ class TimezoneConfig(KickstartConfig):
|
|
os.unlink(localtime)
|
|
os.symlink("/usr/share/zoneinfo/%s" %(tz,), localtime)
|
|
|
|
-class AuthConfig(KickstartConfig):
|
|
- """A class to apply a kickstart authconfig configuration to a system."""
|
|
- def apply(self, ksauthconfig):
|
|
+class AuthSelect(KickstartConfig):
|
|
+ """A class to apply a kickstart authselect configuration to a system."""
|
|
+ def apply(self, ksauthselect):
|
|
|
|
- auth = ksauthconfig.authconfig or "--useshadow --enablemd5"
|
|
- args = ["authconfig", "--update", "--nostart"]
|
|
+ auth = ksauthselect.authselect or "select sssd with-silent-lastlog --force"
|
|
try:
|
|
- subprocess.call(args + auth.split(), preexec_fn=self.chroot)
|
|
+ subprocess.call(['authselect'] + auth.split(), preexec_fn=self.chroot)
|
|
except OSError as e:
|
|
if e.errno == errno.ENOENT:
|
|
- logging.info('The authconfig command is not available.')
|
|
+ logging.info('The authselect command is not available.')
|
|
return
|
|
|
|
class FirewallConfig(KickstartConfig):
|
|
--
|
|
2.31.1
|
|
|