polkitd fails with "Can't read config!"

Latest response

I did encounter problem with polkit on RHEL7.9 which fails to execute any action due to invalid authorization result (see below the output from polkitd - the failing rules are not a problem). It does not matter what and who executes the action (except root of course :)) as it always end up with the same error and effectively makes everybody "not-authorized".

abr 11 16:58:39 localhost polkitd[16015]: Loading rules from directory /etc/polkit-1/rules.d
abr 11 16:58:39 localhost polkitd[16015]: Loading rules from directory /usr/share/polkit-1/rules.d
abr 11 16:58:39 localhost polkitd[16015]: /etc/polkit-1/rules.d/11.org.fedoraproject.FirewallD1.rules:3: SyntaxError: unterminated string literal
abr 11 16:58:39 localhost polkitd[16015]: Error compiling script /etc/polkit-1/rules.d/11.org.fedoraproject.FirewallD1.rules
abr 11 16:58:39 localhost polkitd[16015]: Finished loading, compiling and executing 66 rules
abr 11 16:58:39 localhost systemd[1]: Started Authorization Manager.
abr 11 16:58:39 localhost polkitd[16015]: Returned result Can't read config!' is not valid
abr 11 16:58:39 localhost polkitd[16015]: Returned result
Can't read config!' is not valid
abr 11 16:58:39 localhost polkitd[16015]: Returned result Can't read config!' is not valid
abr 11 16:58:39 localhost polkitd[16015]: Returned result
Can't read config!' is not valid
abr 11 16:58:39 localhost polkitd[16015]: Returned result `Can't read config!' is not valid

The polkitd daemon gives bit more details about the error - "Unknown PolkitImplicitAuthorization string 'Can't read config!' " but thats it and I'm in dead end. Looks like the authorization agent is not started at all but I do not see any way to debug it further. All polkit-related packages were reinstalled.

Any advice how to pin-point the problem?

Responses

Hello Pavel Duda,

I've seen other polkit issues such as this discussion, however I'd really recommend getting an sosreport and submitting it with a case with Red Hat for this specific issue since it is a bit "new" in terms of what you describe for polkit (unless anyone else has more current information). Also, just for reference, see this link.

Regards
RJ

Thanks RJ. I saw that dicsussion. I was digging deeper into polkit without much success so far so was hoping I did not have to dig down to source code and there are some ways for more debugging information. From the polkit source code it seems that string comes from processing of some policy file (process_policy_file) so I will try to use the "ugly way" and instead of just reinstall I will try to remove all and copy files manualy from another machine :). Since this is single-user issue so far I think that the easiest would be clean reinstall at the end (well cost/time effective at least :D)

Hello Pavel,

I hope that works well for you. I'm curious which files are you going to transplant from the working machine to the one that has an issue? Let us know how that goes please. If possible, tar up the directory prior, or if it is VMware, take a snapshot prior.

Regards,
RJ