From owner-freebsd-questions@FreeBSD.ORG Thu Oct 16 09:43:54 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 3696A106568E for ; Thu, 16 Oct 2008 09:43:54 +0000 (UTC) (envelope-from i.tanusheff@procreditbank.bg) Received: from mail.procreditbank.bg (mail.procreditbank.bg [193.26.216.3]) by mx1.freebsd.org (Postfix) with SMTP id 659D28FC24 for ; Thu, 16 Oct 2008 09:43:53 +0000 (UTC) (envelope-from i.tanusheff@procreditbank.bg) Received: (qmail 40959 invoked from network); 16 Oct 2008 13:03:15 +0300 Received: from unknown (HELO domino.procreditbank.bg) (10.0.0.15) by 192.168.1.3 with SMTP; 16 Oct 2008 13:03:15 +0300 In-Reply-To: <48F6EDF2.4070109@intersonic.se> To: Per olof Ljungmark MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0.3 September 26, 2007 From: Ivailo Tanusheff Message-ID: Date: Thu, 16 Oct 2008 12:43:50 +0300 X-MIMETrack: Serialize by Router on DOMINO/BULGARIA/PROCREDITBANK(Release 7.0.2FP2|May 14, 2007) at 16.10.2008 12:43:52, Serialize complete at 16.10.2008 12:43:52 Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org, owner-freebsd-questions@freebsd.org Subject: Re: 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 09:43:54 -0000 I think the problem is with the permisions of the specific user. The way to get over it is to use sudo and configure it to allow the nagios user execute camcontrol. This way the line should be : sudo camcontrol inquiry da0 Regards, Ivailo Tanusheff Deputy Head of IT Department ProCredit Bank (Bulgaria) AD Per olof Ljungmark Sent by: owner-freebsd-questions@freebsd.org 16.10.2008 10:52 To freebsd-questions@freebsd.org cc Subject FreeBSD and Nagios - permissions 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 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"