事發緣由:因三級等保、需要將centos7系統中的”高危”用戶進行封禁或者注釋,用戶有:
dademon、adm、lp、shutdown、halt、mail、operator、games
ftp、nobody、system-network、polkitd、dbus、postfix,其中polktd、dbus注釋后重啟機子直接導致機子啟動不來,進入單用戶取消注釋方可正常啟動。
后遺症來了:正常啟動后 ,登錄非常慢,連服務器正常啟動都不行,直接報錯:
Authorization not available. Check if polkit service is running or see debug message for more information.
Failed to restart systemd-logind.service: Connection timed out
意思就是請檢查polkit這個服務是否運行,當我去檢查的時候polkit這個服務已經處於不運行的狀態了。可是當我去使用
systemctl start polkit 去啟動服務時候直接報錯:Failed to get properties: Failed to activate service 'org.freedesktop.systemd1': timed out
查詢message日志 dbus一直在報錯:
May 25 16:14:33 localhost systemd: Starting Login Service...
May 25 16:14:57 localhost dbus[1112]: [system] Failed to activate service 'org.freedesktop.login1': timed out
May 25 16:14:58 localhost dbus[1112]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
May 25 16:14:58 localhost systemd-logind: Failed to enable subscription: Failed to activate service 'org.freedesktop.systemd1': timed out
May 25 16:14:58 localhost systemd-logind: Failed to fully start up daemon: Connection timed out
May 25 16:14:58 localhost systemd: systemd-logind.service: main process exited, code=exited, status=1/FAILURE
May 25 16:14:58 localhost systemd: Failed to start Login Service.
May 25 16:14:58 localhost systemd: Unit systemd-logind.service entered failed state.
May 25 16:14:58 localhost systemd: systemd-logind.service failed.
May 25 16:14:58 localhost systemd: systemd-logind.service has no holdoff time, scheduling restart.
May 25 16:14:58 localhost systemd: Starting Login Service...
百度查資料:/usr/lib/polkit-1/polkitd --no-debug
打開一個小窗口服務能正常進行啟動已經關閉。但是啟動polkit 服務時候處於無效狀態。目前只能解決到這里……盡力了……