Quote:
Is there a way where the non-root user would be able to start / stop the service without the su password?
|
Create a system user and group, then make that user/group the owner/group of the service.
Code:
sudo useradd -r nibiru
sudo groupadd -r nibiru
sudo chown nibiru:nibiru /etc/rc.d/myservice
To run the service from another $USERNAME make the latter a member of that group. Be sure your service script is owned 770 granting execution by the group member.
Code:
usermod -a -G nibiru sitchin
Then login as user sitchin and run the service.
Hope that helps.