GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed

How to repair MySQL databases and tables on LINUX servers
March 20, 2021
Order’s status (“pending”) is not acceptable for finalization Lets Encrypt
June 17, 2021

GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed

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)

How to fix this error.

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 and restart the service.

mount -a
systemctl restart polkit

Comments are closed.

%d bloggers like this: