Polkit error - GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed

Started by kandalf, June 11, 2020, 09:51:57 AM

Previous topic - Next topic

kandalf

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:
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?

Sandeep

this is not any error ots some issue with new version of centos 7.8 you can disable secure processes to suppress this message.

kandalf

Quote from: Sandeep 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.
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.

Igor S.




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

NFT

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
    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
    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
    shutdown -r now

cinique

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.

idovecer


idovecer

Quote from: idovecer on May 16, 2022, 09:35:27 AM
Also tnx to the @NFT,
solved also by my side.

Just notice,
temporally solved.

Problem still exists, yesterday I noticed the same message for crond :(.

Is there any solution?! It seems that there is existing problem with CentOS 7.6, even on 7.8.
It doesn't look promising that the RedHat team will address this any time soon.


daniellopesjp

On centos 7, there are instances where you get the error 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)

This usually happens when trying to restart a systemd service.

The workaround is as follows:


groupadd -g 23 nohidproc
usermod -a -G nohidproc polkitd
mount -o remount,rw,hidepid=2,gid=nohidproc /proc
systemctl restart polkit


Add the following in /etc/fstab as well

echo "proc /proc proc defaults,hidepid=2,gid=nohidproc 0 0" >> /etc/fstab

After mount the new mountpoint

mount -a

systemctl restart polkit

Done.


https://www.awaludin.net/how-to-fix-gdbus-errororg-freedesktop-policykit1-error-failed-centos-7/

emar

I can confirm @daniellopesjp solution just worked for me.

Now I can run sh /scripts/update_cwp without these two warnings:

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)


Thanks!

overseer



vipony12

I got error
svxxx.xxx polkitd[9231]: Unregistered Authentication Agent for unix-process:9501:31436 (system bus name :1.37, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.

Any help for me?
I can't start apache


internetdunyam

Quote from: Sandeep 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.

thank you

changlee

Hello,
I am not able to securely mount my CWP disks. Problem do remains and it is not good for a PRO panel.
You may use our FREE SMTP Newsletter APP at https://www.emailbat.com