polkit启动失败_Centos7环境报polkit服务启动失败

polkit 这个是什么服务?

参考网站

https://wiki.archlinux.org/index.php/Polkit_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html

大概知道

polkit是linux服务器上的身份认证组件,目的是让用户证明自己属于某个用户组。更详细的内容,可以参考上面的网址。

经过百度,找到解决方法

PolicyKit failing to start with error: polkit.service: main process exited, code=exited, status=1/FAILURE

1.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"; }

2.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; }

3.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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值