monit-general
[Top][All Lists]
Advanced

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

RE: Running monit from a "shell less" userid -- odd behaviour


From: Tom O'Brien
Subject: RE: Running monit from a "shell less" userid -- odd behaviour
Date: Fri, 18 Feb 2005 10:47:14 -0500

Sorry for the noise!
I solved my own problem. I had recently added a statement like: "allow admin:admin read-only" to the config file. I didn't realize at the time that this would restrict my ability to send commands to the monit daemon.
 
Tom.
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Tom O'Brien
Sent: Thursday, February 17, 2005 6:30 PM
To: 'This is the general mailing list for monit'
Subject: Running monit from a "shell less" userid -- odd behaviour

Hi all:
I'm running monit in daemon mode on RH Linux as a special user id that does not have a login shell (it's only there to run daemons). I create the user as follows (I'll call it "myuser"):

useradd -d /home/myuser -g nobody -m -n -r -s /sbin/nologin myuser

The odd behaviour happens when I want to send commands to monit running on the system. Some commands work:
        <run as myuser> monit -c <config file> reload
        <run as myuser> monit -c <config file> status

However many commands fail:
        <run as myuser> monit -c <config file> restart <service>
        <run as myuser> monit -c <config file> stop all

<Run as myuser> = su -s /bin/bash - myuser -c "/usr/sbin/monit..."
OR
        setuidgid myuser /usr/sbin/monit... (djb's daemontools utility)

Both <Run as myuser> options produce the same result. Running monit with the -v option shows NO output in response to the restart or stop commands, but regular output in response to reload/status commands.

Anyone have any idea why this would be the case? Any way I can make this work?

Thanks for any assistance.
Tom.


reply via email to

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