From owner-freebsd-questions@FreeBSD.ORG Thu Oct 16 10:38:06 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 D41691065691 for ; Thu, 16 Oct 2008 10:38:06 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from k7.mavetju.org (ppp121-44-50-115.lns10.syd7.internode.on.net [121.44.50.115]) by mx1.freebsd.org (Postfix) with ESMTP id 94AD08FC15 for ; Thu, 16 Oct 2008 10:38:06 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by k7.mavetju.org (Postfix, from userid 1001) id 341AC45039; Thu, 16 Oct 2008 21:17:58 +1100 (EST) Date: Thu, 16 Oct 2008 21:17:58 +1100 From: Edwin Groothuis To: freebsd-questions@FreeBSD.org Message-ID: <20081016101758.GA85895@mavetju.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: 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 10:38:06 -0000 > The nrpe daemon that handles the script runs as the "nagios" user and > the command needed is camcontrol: First lines of the check_ciss.sh command: #!/bin/sh if [ $(whoami) != "root" ]; then sudo $* fi And allow in sudoerrs.conf the nagios user to run the check_ciss.sh command without passwords. Works fine here for years :-) Edwin -- Edwin Groothuis Website: http://www.mavetju.org/ edwin@mavetju.org Weblog: http://www.mavetju.org/weblog/