我在 yum 更新后遇到了 Redhat7 问题。各种服务无法启动,并且出现权限错误。
类似问题 在 CentOS 上安装 iRedMail 后无法启动任何服务 但操作系统不同,所以问题可能也不同。
通过谷歌搜索错误消息,我找到了上面的链接,所以我尝试了一些相同的修复方法,请参见下面的每个方法的输出。请帮忙!
service mysqld restart
重定向到 /bin/systemctl restart mysqld.service 获取权限时出错:初始化权限时出错:用尽所有可用的身份验证机制 (已尝试:EXTERNAL、DBUS_COOKIE_SHA1、ANONYMOUS) (可用:EXTERNAL、DBUS_COOKIE_SHA1、ANONYMOUS) (g-io-error-quark,0) mysqld.service 的作业失败,因为控制进程退出时出现错误代码。有关详细信息,请参阅“systemctl status mysqld.service”和“journalctl -xe”。
我昨天执行的 yum 更新包括以下软件包:
grep "Mar 13.*" /var/log/yum.log | awk '{ print $5 }' | grep policy
- selinux-策略-3.13.1-166.el7_4.9.noarch
- selinux-策略-目标-3.13.1-166.el7_4.9.noarch
尝试重新安装,但没有变化,还尝试重新安装以下内容以及上面的 selinux 策略。(没有乐趣)
- rpm -qi dbus
- rpm -qi polkit
systemctl status dbus
â dbus.service - D-Bus 系统消息总线已加载:已加载(/usr/lib/systemd/system/dbus.service;静态;供应商预设:已禁用)活动:自 2018-03-14 星期三 15:12:45 UTC 起活动(正在运行);47 分钟前主 PID:677(dbus-daemon)CGroup:/system.slice/dbus.service ââ677 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-...
3 月 14 日 15:12:45 systemd[1]: 已启动 D-Bus 系统消息总线。
3 月 14 日 15:12:45 systemd[1]: 正在启动 D-Bus 系统消息总线...
3 月 14 日 15:29:10 dbus-daemon[677]: dbus[677]: [系统] 无法重新加载配置...ed
3 月 14 日 15:29:10 dbus-daemon[677]: 无法重新加载配置:无法启动...ed
3 月 14 日 15:29:10 dbus-daemon[677]: dbus[677]: [系统] 无法重新加载配置...ed
journalctl -u dbus
3 月 14 日 15:12:45 systemd[1]: 已启动 D-Bus 系统消息总线。
3 月 14 日 15:12:45 systemd[1]: 正在启动 D-Bus 系统消息总线...
3 月 14 日 15:29:10 dbus-daemon[677]: dbus[677]: [system] 无法重新加载配置:无法打开“/etc/dbus-1/system.conf”:权限被拒绝
3 月 14 日 15:29:10 dbus-daemon[677]: 无法重新加载配置:无法打开“/etc/dbus-1/system.conf”:权限被拒绝
ls -l /etc/dbus-1/system.conf
-rw-r--r-- 1 root root 2991 2016 年 9 月 12 日 /etc/dbus-1/system.conf
systemctl start polkit
获取权限时出错:初始化权限时出错:已用尽所有可用的身份验证机制(已尝试:EXTERNAL、DBUS_COOKIE_SHA1、ANONYMOUS)(可用:EXTERNAL、DBUS_COOKIE_SHA1、ANONYMOUS)(g-io-error-quark,0)polkit.service 的作业因超时而失败。有关详细信息,请参阅“systemctl status polkit.service”和“journalctl -xe”。
namei -l /etc/dbus-1/system.conf
f: /etc/dbus-1/system.conf
drwxr-xr-x root root /
drw------- root root etc
drwxr-xr-x root root dbus-1
-rwxr-xr-x root root system.conf
此外,这是升级的完整列表...我想我应该从备份中恢复...
- 1dhclient-4.2.5-58.el7_4.3.x86_64
- 1dhcp-常见-4.2.5-58.el7_4.3.x86_64
- 1dhcp-libs-4.2.5-58.el7_4.3.x86_64
- 3bind-libs-9.9.4-51.el7_4.2.x86_64
- 3bind-libs-精简版-9.9.4-51.el7_4.2.x86_64
- 3bind-许可证-9.9.4-51.el7_4.2.noarch
- 3bind-utils-9.9.4-51.el7_4.2.x86_64
- 账户服务-0.6.45-3.el7_4.1.x86_64
- 账户服务-libs-0.6.45-3.el7_4.1.x86_64
- pr-1.4.8-3.el7_4.1.x86_64
- 在-3.1.13-22.el7_4.2.x86_64
- binutils-2.25.1-32.base.el7_4.2.x86_64
- colordiff-1.0.13-2.el7.noarch
- 复制-jdk-configs-2.2-5.el7_4.noarch
- cryptsetup-1.7.4-3.el7_4.1.x86_64
- cryptsetup-libs-1.7.4-3.el7_4.1.x86_64
- cryptsetup-python-1.7.4-3.el7_4.1.x86_64
- curl-7.29.0-42.el7_4.1.x86_64
- 设备映射器-多路径-0.4.9-111.el7_4.2.x86_64
- 设备映射器-多路径-库-0.4.9-111.el7_4.2.x86_64
- 设备映射器-持久数据-0.7.0-0.1.rc6.el7_4.1.x86_64
- dleyna-服务器-0.5.0-2.el7_4.x86_64
- dracut-033-502.el7_4.1.x86_64
- dracut-配置-救援-033-502.el7_4.1.x86_64
- dracut-网络-033-502.el7_4.1.x86_64
- epel-release-7-11.noarch
- firefox-52.6.0-1.el7_4.x86_64
- gdb-7.6.1-100.el7_4.1.x86_64
- gdm-3.22.3-13.el7_4.x86_64
- glibc-2.17-196.el7_4.2.i686
- glibc-2.17-196.el7_4.2.x86_64
- glibc-通用-2.17-196.el7_4.2.x86_64
- gtk3-3.22.10-5.el7_4.x86_64
- gtk3-im模块-xim-3.22.10-5.el7_4.x86_64
- gtk-更新图标缓存-3.22.10-5.el7_4.x86_64
- 启动脚本-9.49.39-1.el7_4.1.x86_64
- iptables-1.4.21-18.3.el7_4.x86_64
- iptables-服务-1.4.21-18.3.el7_4.x86_64
- iwl1000-固件-39.31.5.1-58.el7_4.noarch
- iwl100-固件-39.31.5.1-58.el7_4.noarch
- iwl105-固件-18.168.6.1-58.el7_4.noarch
- iwl135-固件-18.168.6.1-58.el7_4.noarch
- iwl2000-固件-18.168.6.1-58.el7_4.noarch
- iwl2030-固件-18.168.6.1-58.el7_4.noarch
- iwl3160-固件-22.0.7.0-58.el7_4.noarch
- iwl3945-固件-15.32.2.9-58.el7_4.noarch
- iwl4965-固件-228.61.2.24-58.el7_4.noarch
- iwl5000-固件-8.83.5.1_1-58.el7_4.noarch
- iwl5150-固件-8.24.2.2-58.el7_4.noarch
- iwl6000-固件-9.221.4.1-58.el7_4.noarch
- iwl6000g2a-固件-17.168.5.3-58.el7_4.noarch
- iwl6000g2b-固件-17.168.5.2-58.el7_4.noarch
- iwl6050-固件-41.28.5.1-58.el7_4.noarch
- iwl7260-固件-22.0.7.0-58.el7_4.noarch
- java-1.7.0-openjdk-1.7.0.171-2.6.13.0.el7_4.x86_64
- java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.0.el7_4.x86_64
- java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64
- java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64
- 内核-3.10.0-693.21.1.el7.x86_64
- 内核工具-3.10.0-693.21.1.el7.x86_64
- 内核工具库-3.10.0-693.21.1.el7.x86_64
- kmod-20-15.el7_4.7.x86_64
- kmod-libs-20-15.el7_4.7.x86_64
- kpartx-0.4.9-111.el7_4.2.x86_64
- kpatch-0.4.0-2.el7_4.noarch
- libblkid-2.23.2-43.el7_4.2.x86_64
- libcurl-7.29.0-42.el7_4.1.x86_64
- libdb-5.3.21-21.el7_4.i686
- libdb-5.3.21-21.el7_4.x86_64
- libdb-utils-5.3.21-21.el7_4.x86_64
- libgcc-4.8.5-16.el7_4.2.i686
- libgcc-4.8.5-16.el7_4.2.x86_64
- libgomp-4.8.5-16.el7_4.2.x86_64
- libgudev1-219-42.el7_4.10.x86_64
- liblouis-2.5.2-12.el7_4.x86_64
- liblouis-python-2.5.2-12.el7_4.noarch
- libmount-2.23.2-43.el7_4.2.x86_64
- libpciaccess-0.13.4-3.1.el7_4.x86_64
- libreswan-3.20-5.el7_4.x86_64
- libsmbclient-4.6.2-12.el7_4.x86_64
- libsss_idmap-1.15.2-50.el7_4.11.x86_64
- libsss_nss_idmap-1.15.2-50.el7_4.11.x86_64
- libstdc++-4.8.5-16.el7_4.2.i686
- libstdc++-4.8.5-16.el7_4.2.x86_64
- libstoragemgmt-1.4.0-5.el7_4.x86_64
- libstoragemgmt-python-1.4.0-5.el7_4.noarch
- libstoragemgmt-python-clibs-1.4.0-5.el7_4.x86_64
- libteam-1.25-6.el7_4.3.x86_64
- libtevent-0.9.31-2.el7_4.x86_64
- libuuid-2.23.2-43.el7_4.2.x86_64
- libvirt-客户端-3.2.0-14.el7_4.9.x86_64
- libvirt-daemon-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程配置网络-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序接口-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序网络-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序-nodedev-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序-nwfilter-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序-qemu-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-秘密-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序存储-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-存储-核心-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序存储磁盘-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-存储-gluster-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-存储-iscsi-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-存储-逻辑-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序存储-mpath-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-驱动程序-存储-rbd-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程驱动程序存储-scsi-3.2.0-14.el7_4.9.x86_64
- libvirt-守护进程-kvm-3.2.0-14.el7_4.9.x86_64
- libvirt-libs-3.2.0-14.el7_4.9.x86_64
- libwbclient-4.6.2-12.el7_4.x86_64
- linux-固件-20170606-58.gitc990aae.el7_4.noarch
- microcode_ctl-2.1-22.5.el7_4.x86_64
- mutter-3.22.3-12.el7_4.x86_64
- mysql-社区-客户端-5.7.21-1.el7.x86_64
- mysql-社区-通用-5.7.21-1.el7.x86_64
- mysql-社区-libs-5.7.21-1.el7.x86_64
- mysql-社区-libs-兼容-5.7.21-1.el7.x86_64
- mysql-社区-服务器-5.7.21-1.el7.x86_64
- nautilus-3.22.3-4.el7_4.x86_64
- nautilus-扩展-3.22.3-4.el7_4.x86_64
- 网络 snmp-libs-5.7.2-28.el7_4.1.x86_64
- nfs-utils-1.3.0-0.48.el7_4.2.x86_64
- python-dmidecode-3.12.2-1.1.el7.x86_64
- python-gobject-3.22.0-1.el7_4.1.x86_64
- python-gobject-base-3.22.0-1.el7_4.1.x86_64
- python-perf-3.10.0-693.21.1.el7.x86_64
- qemu-img-1.5.3-141.el7_4.6.x86_64
- qemu-kvm-1.5.3-141.el7_4.6.x86_64
- qemu-kvm-通用-1.5.3-141.el7_4.6.x86_64
- rhnsd-5.0.13-7.3.el7_4.x86_64
- samba-客户端-libs-4.6.2-12.el7_4.x86_64
- samba-通用-4.6.2-12.el7_4.noarch
- samba-通用库-4.6.2-12.el7_4.x86_64
- samba-通用工具-4.6.2-12.el7_4.x86_64
- samba-libs-4.6.2-12.el7_4.x86_64
- selinux-策略-3.13.1-166.el7_4.9.noarch
- selinux-策略-目标-3.13.1-166.el7_4.9.noarch
- sos-3.4-13.el7_4.noarch
- spice-glib-0.33-6.el7_4.1.x86_64
- spice-gtk3-0.33-6.el7_4.1.x86_64
- sssd-客户端-1.15.2-50.el7_4.11.x86_64
- swiagent-1.8.0.551-835342.x86_64
- systemd-219-42.el7_4.10.x86_64
- systemd-libs-219-42.el7_4.10.i686
- systemd-libs-219-42.el7_4.10.x86_64
- systemd-python-219-42.el7_4.10.x86_64
- systemd-sysv-219-42.el7_4.10.x86_64
- systemtap-运行时-3.1-5.el7_4.x86_64
- teamd-1.25-6.el7_4.3.x86_64
- tigervnc-许可证-1.8.0-2.el7_4.noarch
- tigervnc-服务器-最小-1.8.0-2.el7_4.x86_64
- 调整-2.8.0-5.el7_4.2.noarch
- tzdata-2018c-1.el7.noarch
- tzdata-java-2018c-1.el7.noarch
- util-linux-2.23.2-43.el7_4.2.x86_64
- webkitgtk4-2.14.7-3.el7.x86_64
- webkitgtk4-jsc-2.14.7-3.el7.x86_64
- webkitgtk4-插件-进程-gtk2-2.14.7-3.el7.x86_64
- xorg-x11-服务器-通用-1.19.3-11.el7_4.2.x86_64
- xorg-x11-服务器-Xorg-1.19.3-11.el7_4.2.x86_64
答案1
drw------- root 根等
这看起来不正确,/etc 应该是drwxr-xr-x
这样的
# chmod 755 /etc
将修复该问题,并可能解决更广泛的问题。