1

How could we allow non-root users to control a systemd service

Need to configure non-root users to control a system.d service. How fix the issue

systemd Add a comment
jacob
asked Feb 07 2020
edited Feb 07 2020

Answer

1

Enter into the /etc/sudoers

user ALL= NOPASSWD: /usr/bin/systemctl start httpd.service
user ALL= NOPASSWD: /usr/bin/systemctl stop httpd.service
user ALL= NOPASSWD: /usr/bin/systemctl restart httpd.service
user ALL= NOPASSWD: /usr/bin/systemctl status httpd.service
Add a comment
linuxhelp
asked Feb 07 2020
Post your Answer