monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stop a service as a non root user


From: Mihamina Rakotomandimby
Subject: Re: stop a service as a non root user
Date: Tue, 02 Jul 2013 11:37:21 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 2013-07-02 01:46, Nestor Urquiza wrote:
Hi folks,

We run monit as root which is specially important for Apache service.

Monit controls tomcat servers which run under a different user.

As a non root user I want to to be able to run 'monit tomcat stop' so that I can manage the service the way I would do without monit.

We can issue "service tomcat stop" but of course monit restarts it again.



AFAIK,

$ su - $AN_USER $A_COMMAND would do it

Or, alternatives:
http://stackoverflow.com/questions/6905697/how-to-run-script-as-another-user-without-password
-- 
RMA.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]