-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path0013-Check-add-user-to-wheel-and-qubes-groups.patch
48 lines (43 loc) · 2 KB
/
0013-Check-add-user-to-wheel-and-qubes-groups.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 97c3196a8350bbb2e91f7ba9a00d43cd76478c4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
Date: Sun, 15 Dec 2019 16:55:40 +0100
Subject: [PATCH] Check/add user to 'wheel' and 'qubes' groups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Adapted from 378cfc44dd218c61b838f4f9011dcfd790df59eb
By Marek Marczykowski-Górecki <[email protected]>
---
pyanaconda/ui/gui/spokes/root_password.py | 2 +-
pyanaconda/ui/gui/spokes/user.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
index 10f0b678c5..67973d53d1 100644
--- a/pyanaconda/ui/gui/spokes/root_password.py
+++ b/pyanaconda/ui/gui/spokes/root_password.py
@@ -172,7 +172,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
@property
def mandatory(self):
"""Only mandatory if no admin user has been requested."""
- return not self._users_module.CheckAdminUserExists()
+ return False
def apply(self):
if self.root_enabled and self.password:
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 52f7a464a3..84efd9b5dd 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -481,6 +481,11 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
self.user.name = self.username
self.user.gecos = self.fullname
+ if "wheel" not in self.user.groups:
+ self.user.groups.append("wheel")
+ if "qubes" not in self.user.groups:
+ self.user.groups.append("qubes")
+
# We make it possible to clear users requested from kickstart (or DBus API)
# during an interactive installation. This is done by setting their name
# to "". Then during apply() we will check the user name and if it is
--
2.45.2