I have CentOS 7 server and there is one non-root level user named user1. That user1 only has the permissions to start, stop, enable and disable for Zabbix Services (allow these service in sudoers file). But that user1 can use 'systemctl poweroff' and 'systemctl reboot' without sudo. I would like to prevent it. How can I prevent usage of systemctl poweroff/reboot on user1?
Asked
Active
Viewed 342 times
0
-
I'm not familiar with polkit. If it is ok, I would like to prevent with sudoers file. – Mg Nyi Naing Sep 01 '20 at 09:38
-
1How did he get permission to reboot or shutdown without sudo? – Michael Hampton Sep 01 '20 at 12:35
-
I created one group named zabbixadmin then I assigned zabbix service start stop permission on that group in sudoers. Then I put user1 to the zabbixadmin group. then user1 can reboot and poweroff without sudo. – Mg Nyi Naing Sep 04 '20 at 04:50