Author Topic: Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed  (Read 2051 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I have multiple servers and I have updated 2 of them, now I have the same error on both everytime I tried to restart any service.

I get the following error:
Code: [Select]
Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)

Why we get this error? And what is the solution?

Offline
*****
Re: Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed
« Reply #1 on: June 12, 2020, 07:07:24 AM »
this is not any error ots some issue with new version of centos 7.8 you can disable secure processes to suppress this message.

Offline
*
Re: Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed
« Reply #2 on: June 12, 2020, 01:45:10 PM »
this is not any error ots some issue with new version of centos 7.8 you can disable secure processes to suppress this message.
How can I disable secure processes?

And why this is not an error? This cause that some processes cannot restart and if they stop we are unable to start it, I think the system should not work like that.

Offline
*****
Re: Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed
« Reply #3 on: June 16, 2020, 01:52:31 PM »
This is CentOS bug and seems like they will not fix it :(
https://bugs.centos.org/view.php?id=17291
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Do not "disable secure processes" fix the real reason, Solution, test on 2 updated CentOS 7 with CWP
https://access.redhat.com/solutions/1543343

Resolution:

    Ensure the existence of a polkitd system user & group
    Copy/paste the following 2 compound-commands to a root terminal to check for and conditionally create the user/group
   
Code: [Select]
getent group polkitd >/dev/null && echo -e "\e[1;32mpolkitd group already exists\e[0m" || { groupadd -r polkitd && echo -e "\e[1;33mAdded missing polkitd group\e[0m" || echo -e "\e[1;31mAdding polkitd group FAILED\e[0m"; }
    getent passwd polkitd >/dev/null && echo -e "\e[1;32mpolkitd user already exists\e[0m" || { useradd -r -g polkitd -d / -s /sbin/nologin -c "User for polkitd" polkitd && echo -e "\e[1;33mAdded missing polkitd user\e[0m" || echo -e "\e[1;31mAdding polkitd user FAILED\e[0m"; }

    Reset the permissions and user/group ownership for all files provided by the polkit and polkit-pkla-compat packages
    Copy/paste the following compound-command to a root terminal to check for and conditionally reset user/group perms & ownership
   
Code: [Select]
rpm -Va polkit\* && echo -e "\e[1;32mpolkit* rpm verification passed\e[0m" || { echo -e "\e[1;33mResetting polkit* rpm user/group ownership & perms\e[0m"; rpm --setugids polkit polkit-pkla-compat; rpm --setperms polkit polkit-pkla-compat; }
    Reboot
    A reboot of the machine will be required to make sure that all changes take affect and that polkit has reconnected to the dbus
   
Code: [Select]
shutdown -r now

Offline
***
Re: Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed
« Reply #5 on: July 15, 2020, 08:24:06 AM »
I hereby declare @NFT the winner!  ;D

A simpler method (mount modification) was posted a while back that appears to have cleared the warning. As to whether it is/was effective, is another matter.
« Last Edit: July 15, 2020, 08:28:13 AM by cynique »