No mystery, all depends on sudo-policy-wheel-auth-self being installed in a fresh install, but not in an upgrade from 15.6. You can still uninstall it (if you have a root password defined… be careful).
Fair enough. I did an upgrade, rather than a fresh install.
Check if you have the sudo-policy-wheel-auth-self package installed, and if your primary user account is a member of the wheel group. During an upgrade that user account is probably not added automatically.
sh@meteor:~> whoami
sh
sh@meteor:~> id
uid=1000(sh) gid=100(users) groups=100(users),465(vnc),468(nm-openvpn),476(wheel),481(systemd-timesync),482(video),489(cdrom),490(audio),497(systemd-coredump),499(systemd-journal)
sh@meteor:~> groups
users vnc nm-openvpn wheel systemd-timesync video cdrom audio systemd-coredump systemd-journal
sh@meteor:~> grep wheel /etc/group
wheel:x:476:sh
Add yourself to the group either with Cockpit or with
sudo useradd -aG wheel $USER
HTH
is not installed.
S | Name | Type | Version | Arch | Repository
---+-----------------------------+-------+---------------------+--------+-----------
| sudo-policy-wheel-auth-self | Paket | 1.9.17p1-160000.3.1 | x86_64 | OSS
| sudo-policy-wheel-auth-self | Paket | 1.9.17p1-160000.2.2 | x86_64 | OSS
User is in wheel group:
stephan@linux64:~> groups
users trusted davfs2 libvirt vboxusers cdrom wheel
But it is for me no problem, because I want root password and not Users one…
Only understand why there is a difference between new Installation and Upgrade.
This is now solved for me.
That package consists only of two files that do all the magic:
sh@meteor:~> rpm -ql sudo-policy-wheel-auth-self
/usr/etc/sudoers.d/50-wheel-auth-self
/usr/share/polkit-1
/usr/share/polkit-1/rules.d
/usr/share/polkit-1/rules.d/51-wheel.rules
sh@meteor:~> sudo cat /usr/etc/sudoers.d/50-wheel-auth-self
Defaults:%wheel !targetpw
%wheel ALL = (root) ALL
sh@meteor:~> cat /usr/share/polkit-1/rules.d/51-wheel.rules
polkit._suse_admin_groups.push("wheel");
This is the beauty of splitting up the old monolithic /etc/sudoers config file into tiny snippets in /usr/etc/sudoers.d/ and /etc/sudoers.d/: You can fine-tune the configuration with small packages without needing to edit that large config file, and it’s easy to undo those changes (simply uninstall that package).
Nobody has mentioned “run0” → the systemd replacement for “sudo” …
<systemd/run0>
- openSUSE package: “run0-policy-wheel-auth-self”
run0 provides a safer and more robust alternative to the sudo mechanism, without relying on suid binaries. It uses polkit for authentication.
My preferred method of becoming root, is with “ssh” to “root@localhost” using public key authentication.