防止 CentOS 中的非 root 使用者使用 systemctl poweroff 和 systemctl restart 2024-6-27 • centos systemctl 我有 CentOS 7 伺服器,有一個名為 user1 的非 root 等級使用者。該 user1 僅具有啟動、停止、啟用和停用 Zabbix 服務的權限(在 sudoers 檔案中允許這些服務)。但是 user1 可以使用“systemctl poweroff”和“systemctl restart”而無需 sudo。我想阻止它。如何防止在 user1 上使用 systemctl poweroff/reboot? 相關內容