Bugzilla – Bug 860507
KDM ignores shutdown settings in kdmrc
Last modified: 2015-12-29 11:47:29 UTC
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 No matter how I configure the shutdown settings in "kdmrc", KDM *always* requires root password authorization in order to restart or shutdown the system. Reproducible: Always Steps to Reproduce: 1. Use a openSUSE 12.3 system with the newest updates and KDE 4.12 applications. 2. Try to configure KDM in "/usr/share/kde4/config/kdm/kdmrc" to *not* ask for root authorization, when shutting down or restarting system by setting: AllowShutdown=All 3. Issue: systemctl restart xdm.service 4. Try to shutdown down or restart system by clicking on "Menu->Shutdown...". Actual Results: You receive a pop-up window requesting root password authorization before system can be taken down or restarted. Expected Results: System is being taken down and turned off or system restarts. The problem appeared after having updated KDE from 4.11 (http://download.opensuse.org/repositories/KDE:/Release:/411/openSUSE_12.3/) to 4.12 (http://download.opensuse.org/repositories/KDE:/Release:/412/openSUSE_12.3/). Before the update, KDM was happily shutdown down resp. restarting the system without asking for the root password, but after having done the updating, KDM is always requesting the root password authorization! Tried to downgrade back to KDE 4.11 after this, but this strangely enough did not work either -- KDM was still requesting the root password!
This still applies for KDE 4.13 using repo http://download.opensuse.org/repositories/KDE:/Current/openSUSE_12.3/
Updated "Product" to "openSUSE 13.1", because the same problem under KDE 4.13 also exists here!!
Taken into account that this bug has been opened for almost 4 months ago, and that the bug exists for KDE 4.12 and 4.13 on openSUSE 12.3 and 13.1, would not it be worth the time to have a look at this bug report as well as how to get the problem fixed?
Dear Dennis, The issue is that we cannot reproduce your issue. The default kdmrc is setup that everybody is allowed to shutdown the system. However what I am not sure of is how perhaps other security settings are influencing this. Can you paste the content of the file /etc/sysconfig/security ?
Actually this setting (who is allowed to shutdown the system) is still taken from /etc/sysconfig/displaymanager (variable "DISPLAYMANAGER_SHUTDOWN"). Only if this is set to "auto" (which is the default), the security settings in /etc/sysconfig/security are taken into account. Set it to "all" and you shouldn't get asked for the root password any more, regardless of /etc/sysconfig/security.
As far as I understand the settings in "/etc/sysconfig/{displaymanager,security}" are only being used by SuSEconfig, which does not exist anymore. Anyway, when I am editing the "/usr/share/kde4/config/kdm/kdmrc" directly, saving the changes, logging out and then checking what happens, when I try to make use of the shutdown menu in KDM, the settings in the "/etc/sysconfig" files are of no interest what so ever, right?
(In reply to comment #6) > As far as I understand the settings in > "/etc/sysconfig/{displaymanager,security}" are only being used by SuSEconfig, > which does not exist anymore. SuSEconfig does not exist anymore, that's right. But KDM still takes certain settings from those files. > Anyway, when I am editing the "/usr/share/kde4/config/kdm/kdmrc" directly, > saving the changes, logging out and then checking what happens, when I try to > make use of the shutdown menu in KDM, the settings in the "/etc/sysconfig" > files are of no interest what so ever, right? KDM doesn't restart when you logout, so I don't think it re-reads the changed config. And the settings in /etc/sysconfig/ are written to kdmrc when (before) KDM starts. So change /etc/sysconfig/displaymanager as I suggested and reboot. You should not get asked for the root password then any more.
The settings in /etc/sysconfig are used by all available display managers (e.g. GDM, KDM, etc). Indeed this is something openSUSE specific and in the past almost all KDM settings were taken from there. The thought behind this was to have a uniform setup of the display managers and no matter which display manager was in use, the same setup would apply. Around KDE 4.11, this was changed to allow the user to change more things around KDM through the standard KDE systemsettings. In order to keep equal to the GNome setup, a couple of settings remained and were taken from /etc/sysconfig. Based on this bug report, I looked into the GDM setup and there seems to have been some changes as well. At the moment I am testing a patch where also the settings with regards to password-less users and the DISPLAYMANAGER_SHUTDOWN parameter are now taken from the default KDM configuration in /usr/share/kde4/config/kdm/kdmrc. If everything goes fine, then this patch could land in the KDE repositories latest tomorrow.
(In reply to comment #7) > KDM doesn't restart when you logout, so I don't think it re-reads the changed > config. Argh, yes, sorry, my fault -- Using "ctrl-backspace" twice only restarts the X-server, not the KDM. Restarting KDM needs a "systemctl restart xdm.service". > And the settings in /etc/sysconfig/ are written to kdmrc when (before) KDM > starts. Written to "/.../kdmrc" before KDM is started? I do not think so: # ls -la /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc -r--r--r-- 1 root root 3581 May 9 15:48 /etc/sysconfig/displaymanager -r--r--r-- 1 root root 23149 May 12 13:48 /usr/share/kde4/config/kdm/kdmrc # # egrep '(SHUTDOWN|Shutdown)=' /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc /etc/sysconfig/displaymanager:DISPLAYMANAGER_SHUTDOWN="all" /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=Root /usr/share/kde4/config/kdm/kdmrc:#PluginsShutdown=modern /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=All # # # Edit "/etc/sysconfig/displaymanager" # # Changing: DISPLAYMANAGER_SHUTDOWN="root" # # ls -la /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc -r--r--r-- 1 root root 3582 May 19 10:27 /etc/sysconfig/displaymanager -r--r--r-- 1 root root 23149 May 12 13:48 /usr/share/kde4/config/kdm/kdmrc # # egrep '(SHUTDOWN|Shutdown)=' /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc /etc/sysconfig/displaymanager:DISPLAYMANAGER_SHUTDOWN="root" /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=Root /usr/share/kde4/config/kdm/kdmrc:#PluginsShutdown=modern /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=All # # systemctl restart xdm.service # # ls -la /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc -r--r--r-- 1 root root 3582 May 19 10:27 /etc/sysconfig/displaymanager -r--r--r-- 1 root root 23149 May 12 13:48 /usr/share/kde4/config/kdm/kdmrc # # egrep '(SHUTDOWN|Shutdown)=' /etc/sysconfig/displaymanager /usr/share/kde4/config/kdm/kdmrc /etc/sysconfig/displaymanager:DISPLAYMANAGER_SHUTDOWN="root" /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=Root /usr/share/kde4/config/kdm/kdmrc:#PluginsShutdown=modern /usr/share/kde4/config/kdm/kdmrc:#AllowShutdown=All # As can be seen from the above command sequences the "/.../kdmrc" file is *not* updated at all, before the KDM is started, eventhough the "/../displaymanager" file was updated! The runtime used settings, though, are, as you said, set in accordance with the settings in "/../displaymanager", e.g. the setting of "AllowShutdown" will be set to what has been defined in "/../displaymanager" completely ignoring the settings in the "/../kdmrc" file! In this case, the KDM now requests "root" authentication, which cannot be entered -- see bug 860506, bug 850813 and bug 772344 as to why.
(In reply to comment #8) > The settings in /etc/sysconfig are used by all available display managers > (e.g. GDM, KDM, etc). Indeed this is something openSUSE specific and in the > past almost all KDM settings were taken from there. >... Ahh, this might also explain, why these error messages in the system log appears: May 19 10:34:50 sylt systemd[1]: Starting LSB: X Display Manager... May 19 10:34:50 sylt xdm[18428]: Starting service kdm..done May 19 10:34:50 sylt systemd[1]: Started LSB: X Display Manager. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [General] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [Xdmcp] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [X-*-Core] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [X-*-Greeter] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of key 'Language' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [X-:*-Core] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. May 19 10:34:51 sylt kdm_config[18441]: Multiple occurrences of section [X-:0-Core] in /usr/share/kde4/config/kdm/kdmrc. Consider merging them. My problem with this is that when looking through the "/usr/share/kde4/config/kdm/kdmrc" file, you *cannot* find *any* multiple occurrences of anything in this file! But, of course, when (re)creating a "fake" version of the file based on the settings found in the "/etc/sysconfig/displaymanager" merged with the settings found in "/usr/share/kde4/config/kdm/kdmrc", one naturally ends up with multiple occurrences, which again explains, why these very annoying error (and completely unnecessary!!) reports occur. Although I find the idea of having a "central" configuration file for display managers amendable, it is not compatible with neither good user experience/interfacing nor the configuration tools that exist for each of these display managers. It might have been true in the past that such a central configuration was "nice" (perhaps even "needed"), but this is no longer the case and especially not when the "old" ways of *unconditionally* overwriting the settings the user can set using the native configuration tools of the user's chosen display manager. Doing so completely undermines the native display manager configuration tools in ways that is completely intangible to the user, leaving the user with the impression that the native display manager configuration tools does not work. I therefore *strongly* suggest to change the "old ways" of configuring the display manager(s) to a more up-to-date and modern usage of the for the task designed native display manager configuration tools, perhaps with hints/comments in the "/etc/sysconfig/displaymanager" about how the "old ways" settings have been replaced by usage of the native tools. (In reply to comment #8) > Based on this bug report, I looked into the GDM setup and there seems to have > been some changes as well. At the moment I am testing a patch where also the > settings with regards to password-less users and the DISPLAYMANAGER_SHUTDOWN > parameter are now taken from the default KDM configuration in > /usr/share/kde4/config/kdm/kdmrc. > > If everything goes fine, then this patch could land in the KDE repositories > latest tomorrow. Well, as far as I can see, the behaviour of KDM has not changed after having installed the lastest updates. Currently using: # rpm -qa kdm kdm-4.11.9-111.1.x86_64 taken from the repository "Main Update Repository" @ "http://download.opensuse.org/update/13.1/".
This should be fixed in 13.2 and later, kdm only uses the "AllowShutdown" option from kdmrc now. 13.1 is nearing it's end of life soon, and I'm not sure if such a behavioral change would be a good idea in a released product though.