[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (root) AUTH (crontab command not allowed)



On Tue, Apr 10, 2007 at 05:08:52PM +0300, Andrei Popescu wrote:
> Kay Smarczewski <kay.smarczewski@mailbox.tu-dresden.de> wrote:
> 
> > > Me too, and it works fine. I do not edit /etc/crontab, but prefer
> > > adding files to the cron directories.
> > > (/etc/cron.d, /etc/cron.hourly ...)
> > Checksecurity also installed itself this way. But I wonder why all
> > cron jobs work fine but this does not.
> 
> Well, you never told us what that job is. Maybe you should post your
> crontab here.
my crontabs are empty. i have removed the crontab for my user account
and the crontab for root with "crontab -r". so that is another problem:
i do not really know where to search for the "bad" command because the
error message is not very expressive. i seem it is the chkrootkit or the
checksecurity script. but i do not know.

how can i find out which file is the bad one?

best regards

kay
#!/bin/sh
# /etc/cron.daily/checksecurity: Run the checksecurity script
# Steve Greenland <stevegr@debian.org>

LOCKFILE=/var/lock/checksecurity.daily

# The logfile we write our changes into.
LOGFILE=/var/log/checksecurity.log
umask 022

#
# Exit silently if the checksecurity package is not installed. (We may be
# here just because we're conffile left over from a previous installation).
#
[ -e /usr/sbin/checksecurity ] || exit 0
#

#
# Avoid running more than one at a time -- could happen if the
# checksecurity script lands on a network drive.
#

if [ -x /usr/bin/lockfile-create ] ; then
    lockfile-create $LOCKFILE
    if [ $? -ne 0 ] ; then
	cat <<EOF

Unable to run /etc/cron.daily/checksecurity because lockfile $LOCKFILE
acquisition failed. This probably means that the previous days instance
is still running. Please check and correct if necessary.

EOF
	exit 1
    fi

    # Keep lockfile fresh
    lockfile-touch $LOCKFILE &
    LOCKTOUCHPID="$!"
fi

checksecurity daily >>"$LOGFILE"

#
# Clean up lockfile
#
if [ -x /usr/bin/lockfile-create ] ; then
    kill $LOCKTOUCHPID
    lockfile-remove $LOCKFILE
fi
#!/bin/sh -e

CHKROOTKIT=/usr/sbin/chkrootkit
CF=/etc/chkrootkit.conf
LOG_DIR=/var/cache/chkrootkit

if [ ! -x $CHKROOTKIT ]; then
  exit 0
fi

if [ -f $CF ]; then
    . $CF
fi

if [ "$RUN_DAILY" = "true" ]; then
    if [ "$DIFF_MODE" = "true" ]; then
        $CHKROOTKIT $RUN_DAILY_OPTS > $LOG_DIR/log.new 2>&1
        if [ ! -f $LOG_DIR/log.old ] \
           || ! diff -q $LOG_DIR/log.old $LOG_DIR/log.new > /dev/null 2>&1; then
            cat $LOG_DIR/log.new
        fi
        mv $LOG_DIR/log.new $LOG_DIR/log.old
    else
        $CHKROOTKIT $RUN_DAILY_OPTS
    fi
fi

Attachment: signature.asc
Description: Digital signature


Reply to: