Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2008 09:32:02 +0200
From:      Per olof Ljungmark <peo@intersonic.se>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD and Nagios - permissions
Message-ID:  <48F6EDF2.4070109@intersonic.se>

next in thread | raw e-mail | index | archive | help
Hi,

I'm implementing a shell script as a Nagios plugin to check the status
of the ciss(4) driver. However, there is a permission problem that I am
not sure about the best way to get around in FreeBSD (7-STABLE).

The nrpe daemon that handles the script runs as the "nagios" user and
the command needed is camcontrol:

camcontrol inquiry da0

The nagios user does not have a shell by default in FreeBSD:
nagios:*:181:181::0:0:Nagios pseudo-user:/var/spool/nagios:/usr/sbin/nologin
so the script will obviously fail.

I would assume there are several ways to get around this and would
welcome "best practice" suggestions on how.

Thanks,

--per



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48F6EDF2.4070109>