I'm trying to allow a user to use sudo to manage a custom systemctl service, this however seems to fail and I can't figure out why.
[root@testvm sudoers.d]# ll
total 16
-r--r-----. 1 root root 334 Oct 9 15:42 20_appgroup
-r--r-----. 1 root root 104 Sep 17 11:24 98_admins
The 'appgroup' contains this;
[root@testvm sudoers.d]# cat 20_appgroup
%appgroup ALL= /usr/bin/systemctl restart test.service,
/usr/bin/systemctl start test.service, /usr/bin/systemctl stop
test.service, /usr/bin/systemctl status test.service
I have double checked that the user is member of the appgroup, however when this user runs sudo systemctl start test.service this results in an error saying;
Sorry, user tester is not allowed to execute '/usr/bin/systemctl start test' as root on testvm.
Any thought on what could be the issue?