Tutorial - How to fix GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed | Vevioz Community

Tutorial How to fix GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed

DevOps

Linux Systems Engineer
Joined
Oct 18, 2019
Messages
136
Reaction score
11
Points
18
Location
Indonesia
Website
www.anymusics.com
Offline
On centos 7, there are instances where you get the error Unable to register authentication agent: GDBus.Error:eek:rg.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:eek:rg.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:
Code:
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
Code:
echo "proc /proc proc defaults,hidepid=2,gid=nohidproc 0 0" >> /etc/fstab
After mount the new mountpoint
Code:
mount -a
Code:
systemctl restart polkit
 
Top Bottom