Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: kandalf on June 11, 2020, 09:51:57 AM
-
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?
-
this is not any error ots some issue with new version of centos 7.8 you can disable secure processes to suppress this message.
-
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.
-
This is CentOS bug and seems like they will not fix it :(
https://bugs.centos.org/view.php?id=17291
-
Do not "disable secure processes" fix the real reason, Solution, test on 2 updated CentOS 7 with CWP
https://access.redhat.com/solutions/1543343 (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
-
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.
-
Also tnx to the @NFT,
solved also by my side.
-
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.
-
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/
-
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!
-
I can validate this fix also. Thanks!
-
works for me too
-
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
-
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
-
Hello,
I am not able to securely mount my CWP disks. Problem do remains and it is not good for a PRO panel.
-
I think this issue has returned,
After running sh /scripts/update_cwp
ERROr Ajax: Error
-
mount proc -o remount,hidepid=0
systemctl restart polkit.service
-
The last year I face many update CWP PRO problems. For each server I ask paid support. This is not trusty.
-
The error "Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject" is related to the PolicyKit1 service, which manages permissions and access privileges on systems based on Linux. This error occurs when PolicyKit1 cannot determine the subject user, which can lead to permission issues.
Here are some possible solutions to fix this problem:
Verify User: Make sure you are logged in with a valid user account and that the user has the appropriate permissions to access the PolicyKit1 service. If you're using a GUI, make sure you've entered your username and password correctly.
Check PolicyKit1 permissions: Make sure PolicyKit1 configuration files have the correct permissions. PolicyKit1 configuration files are usually located in the /etc/polkit-1/ or /usr/share/polkit-1/ directory. Check if the files are readable and writable for the correct users.
Restart the service: Try restarting the PolicyKit1 service to see if that resolves the issue. You can use the following command depending on your operating system:
For distributions using systemd:
sudo systemctl restart polkit
For distros using Upstart:
sudo service polkit restart
Check system logs: Check the system logs for more information about the specific error that is occurring. System logs may be in the /var/log/ directory and relevant files may include syslog, auth.log, or polkit.log.
Check disk space: Sometimes a lack of disk space can lead to unexpected errors. Make sure you have enough disk space available on your system.
Update the system: Make sure your operating system is up to date with the latest updates and patches. Sometimes errors can be fixed by system updates.
If none of the above steps resolves the problem, there may be a more complex problem specific to your system. In this case, it may be worth contacting your operating system's technical support or searching online forums and discussions for further assistance.
-
I have had this same problem which I think started after I installed cwp_2fa and run centos 7 then did a centos 7 update. After I removed the cwp_2fa I now have a bigger problem 404 page index is missing. /login/index.php
run sh /scripts/update_cwp won't fix it.
-
Do you mind starting your own thread to address your particular problem? It seems off-topic to the Polkit error addressed in this thread.