CentOS Linux 7.4中polkit服务启动失败

CentOS Linux 7.4中polkit服务启动失败

**当在CentOS Linux7系统中自动脚本安装时,出现以下报错:**

==> SSH
Authorization not available. Check if polkit service is running or see debug message for more information.
Redirecting to /bin/systemctl restart sshd.service
Authorization not available. Check if polkit service is running or see debug message for more information.
Failed to restart sshd.service: Connection timed out
See system logs and ‘systemctl status sshd.service’ for details.

  1. 1.确保polkitd系统用户和组的存在 将以下2个复合命令复制、粘贴到根终端以检查并有条件地创建用户
    [root@hdfs1.safedog.cn ~]# /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”; }

    [root@hdfs1.safedog.cn ~]# /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. 重置polkit和polkit-pkla-compat包提供的所有文件的权限和用户/组所有权将以下复合命令复制/粘贴到根终端,以检查并有条件地重置用户/组权限和所有权

    [root@hdfs1.safedog.cn ~]# 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. 重新启动
    需要重新启动计算机以确保所有更改都生效并且polkit已重新连接到dbus
    [root@hdfs1.safedog.cn ~]# reboot

  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值