File cinnamon-wheel-and-sbin-path.patch of Package cinnamon

--- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py
+++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py
@@ -34,12 +34,12 @@ def getGraphicsInfos():
     count = 0
     envpath = os.environ["PATH"]
     os.environ["PATH"] = envpath + ":/usr/local/sbin:/usr/sbin:/sbin"
-    for card in getProcessOut(("lspci")):
+    for card in getProcessOut(("/sbin/lspci")):
         if not "VGA" in card:
             continue
         cardId = card.split()[0]
         cardName = None
-        for line in getProcessOut(("lspci", "-v", "-s", cardId)):
+        for line in getProcessOut(("/sbin/lspci", "-v", "-s", cardId)):
             if line.startswith(cardId):
                 cardName = (line.split(":")[2].split("(rev")[0].strip())
 
--- a/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
+++ b/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
@@ -152,7 +152,6 @@ class PasswordDialog(Gtk.Dialog):
 
         self.user = user
         self.password_mask = password_mask
-        self.group_mask = group_mask
 
         self.set_modal(True)
         self.set_skip_taskbar_hint(True)
@@ -219,13 +218,7 @@ class PasswordDialog(Gtk.Dialog):
         newpass = self.new_password.get_text()
         self.user.set_password(newpass, "")
         mask = self.group_mask.get_text()
-        if "nopasswdlogin" in mask:
-            subprocess.call(["gpasswd", "-d", self.user.get_user_name(), "nopasswdlogin"])
-            mask = mask.split(", ")
-            mask.remove("nopasswdlogin")
-            mask = ", ".join(mask)
-            self.group_mask.set_text(mask)
-            self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
+        self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
         self.destroy()
 
     def set_passwords_visibility(self):
@@ -574,7 +567,7 @@ class Module:
             response = dialog.run()
             if response == Gtk.ResponseType.OK:
                 groups = dialog.get_selected_groups()
-                subprocess.call(["usermod", user.get_user_name(), "-G", ",".join(groups)])
+                subprocess.call(["/usr/sbin/usermod", user.get_user_name(), "-G", ",".join(groups)])
                 groups.sort()
                 self.groups_label.set_text(", ".join(groups))
             dialog.destroy()
@@ -808,11 +801,11 @@ class Module:
             pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/faces/user-generic.png", 48, 48)
             description = "<b>%s</b>\n%s" % (fullname, username)
             piter = self.users.append(None, [new_user, pixbuf, description])
-            # Add the user to his/her own group and sudo if Administrator was selected
+            # Add the user to his/her own group and wheel if Administrator was selected
             if dialog.account_type_combo.get_active() == 1:
-                subprocess.call(["usermod", username, "-G", "%s,sudo,nopasswdlogin" % username])
+                subprocess.call(["/usr/sbin/usermod", username, "-G", "%s,wheel" % username])
             else:
-                subprocess.call(["usermod", username, "-G", "%s,nopasswdlogin" % username])
+                subprocess.call(["/usr/sbin/usermod", username, "-G", "%s" % username])
             self.load_groups()
         dialog.destroy()
 
@@ -857,7 +850,7 @@ class Module:
             d.set_default_response(Gtk.ResponseType.NO)
             r = d.run()
             if r == Gtk.ResponseType.YES:
-                subprocess.call(["groupdel", group])
+                subprocess.call(["/usr/sbin/groupdel", group])
                 self.load_groups()
             d.destroy()
 
@@ -865,7 +858,7 @@ class Module:
         dialog = GroupDialog(_("Group Name"), "")
         response = dialog.run()
         if response == Gtk.ResponseType.OK:
-            subprocess.call(["groupadd", dialog.entry.get_text().lower()])
+            subprocess.call(["/usr/sbin/groupadd", dialog.entry.get_text().lower()])
             self.load_groups()
         dialog.destroy()
 
@@ -876,7 +869,7 @@ class Module:
             dialog = GroupDialog(_("Group Name"), group)
             response = dialog.run()
             if response == Gtk.ResponseType.OK:
-                subprocess.call(["groupmod", group, "-n", dialog.entry.get_text().lower()])
+                subprocess.call(["/usr/sbin/groupmod", group, "-n", dialog.entry.get_text().lower()])
                 self.load_groups()
             dialog.destroy()
 
openSUSE Build Service is sponsored by