From: Martin Zobel-Helas Date: Mon, 2 Jan 2012 15:47:03 +0000 (+0100) Subject: add rudimentary check for unowned files X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=6a8befc56f309e1e0b13fb91b213128a6f6b2bc6;p=mirror%2Fdsa-nagios.git add rudimentary check for unowned files Signed-off-by: Martin Zobel-Helas --- diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index b983c42..cba4afc 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -16,7 +16,10 @@ dsa-nagios-checks (9X) Xnstable; urgency=low * Add event_handler to restart services * Add dsa-check-raid-megactl for awkward PeRC controllers - -- Peter Palfrader Sat, 24 Dec 2011 16:25:32 +0100 + [ Martin Zobel-Helas ] + * add rudimentary check for unowned files + + -- Martin Zobel-Helas Mon, 02 Jan 2012 16:46:33 +0100 dsa-nagios-checks (89) unstable; urgency=low diff --git a/dsa-nagios-checks/debian/cron.d b/dsa-nagios-checks/debian/cron.d index 031d3d5..4e897b4 100644 --- a/dsa-nagios-checks/debian/cron.d +++ b/dsa-nagios-checks/debian/cron.d @@ -4,4 +4,5 @@ @hourly root [ -x /usr/sbin/dsa-update-apt-status ] && /usr/sbin/dsa-update-apt-status 13 */4 * * * root [ -x /usr/sbin/dsa-update-samhain-status ] && /usr/sbin/dsa-update-samhain-status +4 4 1 * * root [ -x /usr/sbin/dsa-update-unowned-file-status ] && /usr/sbin/dsa-update-unowned-file-status # vim:ft=crontab: diff --git a/dsa-nagios-checks/sbin/dsa-update-unowned-file-status b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status new file mode 100755 index 0000000..746d3b2 --- /dev/null +++ b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status @@ -0,0 +1,20 @@ +#!/bin/sh + +# Copyright (C) 2012 Martin Zobel-Helas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +find / -nouser > /var/cache/dsa/nagios/nouser