Description of problem: I have setted that only root can poweroff/restart the system, but the system ignores that option Version-Release number of selected component (if applicable): KDE Version 4.12.3
There are 2 ways to shutdown/restart the machine as non-root: * the traditional KDE way, through KDM (still the default when KDM is in use) and * the new way, through systemd (used by KDE when you aren't using KDM, and by pretty much everything else in the distro). They use different policy settings to decide who is allowed to do it. KDM (which runs as root, which is why it can perform the shutdown/restart in the first place) uses the setting from KDE System Settings. On the other hand, systemd uses PolicyKit. The setting in KDE's System Settings only affects KDM, not systemd.
What is affected when someone clicks onto Exit->Poweroff?
If you're running KDM, it will do the shutdown through KDM, and so the settings should be respected. If you're running some other display manager (SDDM, GDM, LightDM etc.) or none at all (i.e. if you use "startx startkde" or something like that), it uses systemd, so the settings used will be the PolicyKit ones. Eventually, KDM will be phased out entirely and only the PolicyKit setting will be relevant.
Ok it is defenitely a bug
Created attachment 883777 [details] settings screenshot
Tried this setting. When switched to KDM, it did ask me for root's password when I tried to shut the system down.
Please note that the option you're pointing out as wrong affects only KDM's (the login screen) shutdown dialog. You need to set PolicyKit rules if you want to prevent users from using any other way of shutting the system down (e. g. the Exit->Poweroff menu entry in Kickoff).
The setting I opened the bugreport about, prevented for more than a year, the system from people trying to powering it off from Exit->Poweroff menu entry in Kickoff. Now I am going to upgrade the system to lastest KDE version and I will try again.
It won't help. Kickoff's Poweroff does respect the systemwide policies. KDM does not. Actually, to behave consistently with the rest of the system, there should be no such option in System Settings.
I think I have been misunderstood, but I solved the problem on two diffent machines by simply removing and by applying again the settings. I think an "n" config file had some troubles and applying again the settings overwritten the config file. Now if anybody tries to poweroff the computer, the user session ends, but KDM asks for root password. If the user does not enter root password, KDM will bring him into a KDM login screen. That is what I needed and what got broken in past.
> It won't help. Kickoff's Poweroff does respect the systemwide policies. KDM > does not. It's actually more complicated than that. Kickoff's Poweroff uses ksmserver. The logic in ksmserver is: * if KDM is running, ask KDM to do the shutdown, * otherwise, ask systemd to do the shutdown. (There are actually more methods, but those 2 are the relevant ones in Fedora.) So which settings are applied depends on what login manager KDE was started from. (And yes, in principle, we could just always use systemd. But then the setting in System Settings would not be applied anymore.)