monit-general
[Top][All Lists]
Advanced

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

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


From: Tom O'Brien
Subject: Running monit from a "shell less" userid -- odd behaviour
Date: Thu, 17 Feb 2005 18:30:11 -0500

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]