Sudoers NOPASSWD option not working

are both things needed? the Group and the polkit rule?

The group should be created automatically by the package libvirt-daemon.

Yes the group is created, but the user has to be added to it. It had no effect on the password prompt for me though. So I wonder if just allowing the commands for all wheel users would be enough to avoid them.

A new group membership requires to terminate all active user processes or just reboot:

sudo loginctl terminate-user ${USER}
sudo pkill -9 -u ${USER}
sudo reboot

Logout is often not enough as it only sends a graceful termination signal ignored by some processes unless the option KillUserProcesses is enabled.

1 Like

I made a small script automatically creating Polkit rules, as the process is tedious. What do you think of it?

You can optimize the code to look like this:
Fedora 37 - Can't have wifi properly working - Realtek 8821CE - #7 by vgaetera