From owner-freebsd-questions@FreeBSD.ORG Thu Oct 16 07:51:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9619C1065686 for ; Thu, 16 Oct 2008 07:51:18 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5FAEC8FC12 for ; Thu, 16 Oct 2008 07:51:18 +0000 (UTC) (envelope-from peo@intersonic.se) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <48F6EDF2.4070109@intersonic.se> Date: Thu, 16 Oct 2008 09:32:02 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Thunderbird 2.0.0.16 (X11/20080927) MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: FreeBSD and Nagios - permissions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2008 07:51:18 -0000 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