From owner-freebsd-questions@FreeBSD.ORG Sat Nov 26 23:33:43 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10EF116A41F for ; Sat, 26 Nov 2005 23:33:43 +0000 (GMT) (envelope-from fasterdisco@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C42D43D72 for ; Sat, 26 Nov 2005 23:33:29 +0000 (GMT) (envelope-from fasterdisco@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so729376nzd for ; Sat, 26 Nov 2005 15:33:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Sl5x9mMyUdp5uAGZIibM+Eo0kZ837RJBr7kLbBosHuYloFss02kRSkWjdefMyeZQgdwacuC5s+DWDlW7SY0Icbf38A5kMMDcp/dlaPMe3QR9KIVD6OeWfiumxRaIZC2y69t96vhmJWaymgvln0/4NO6tcwPXlRWGr/ZS6AoXD6E= Received: by 10.65.11.14 with SMTP id o14mr1922434qbi; Sat, 26 Nov 2005 15:33:28 -0800 (PST) Received: by 10.65.43.6 with HTTP; Sat, 26 Nov 2005 15:33:28 -0800 (PST) Message-ID: Date: Sat, 26 Nov 2005 18:33:28 -0500 From: "matt ." To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Running mrtg on FreeBSD 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: Sat, 26 Nov 2005 23:33:43 -0000 Heya folks, I hope this question isn't too MRTG-centric in-so-far-as I should be postin= g it to the MRTG list (which I have and received no response).... My quandry: I don't want MRTG run as root, however creating a crontab in /var/cron for the mrtg user yeilds errors every time it tries to run. mrtg user entry: mrtg:*:10103:10103::0:0:MRTG Stats Collector:/nonexistent:/sbin/nologin mrtg directory permissions: cd /usr/local/etc drwxr-xr-x 2 mrtg wheel 512 Nov 23 15:10 mrtg My output directory: drwxr-xr-x 2 mrtg wheel 512 Nov 23 14:18 mrtg crontab entry: */5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg Error: 2005-11-24 17:55:00 -- Started mrtg with config '/usr/local/etc/mrtg/mrtg.cfg' 2005-11-24 17:55:00 -- Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 720. 2005-11-24 17:55:00 -- Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 720. 2005-11-24 17:55:00 -- ERROR: Can't Execute '/rateup' If I run the same cron job as root, it works just dandy. Even O'Reilly's "Essential SNMP" states it's not necessary to run mrtg as root: Quote from section 13.1: "The next step is to make sure MRTG runs every five minutes. There's no nee= d for MRTG to be run by root; any user will do. Add a line like the following to the *crontab* entry for the appropriate user." I've experienced this problem on 4.11 and 6.0. I have seen it working on another 4.11 box, however I can't figure out how they did it :-/ Is there perhaps something FreeBSD-specific I'm overlooking? thanks! kind regards, matt