Problem mit Crontab und IAM
Problem mit Crontab und IAM
Hi
Ich habe IAM gelöscht, nun bekomme ich aber laufend Mails mit dem Betreff:
Cron <root@p15142372> /usr/local/iam/iam_report
Inhalt:
/bin/sh: line 1: /usr/local/iam/iam_report: No such file or directory
Nun habe ich versucht den crontab für IAM zu löschen, leider befindet er sich nicht in den cron dir´s....
kann mir jemand helfen?
Thomas
Ich habe IAM gelöscht, nun bekomme ich aber laufend Mails mit dem Betreff:
Cron <root@p15142372> /usr/local/iam/iam_report
Inhalt:
/bin/sh: line 1: /usr/local/iam/iam_report: No such file or directory
Nun habe ich versucht den crontab für IAM zu löschen, leider befindet er sich nicht in den cron dir´s....
kann mir jemand helfen?
Thomas
-
captaincrunch
- Userprojekt

- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Problem mit Crontab und IAM
grep -r iam /var/spool/cron*
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Re: Problem mit Crontab und IAM
Hi
Kommen trotzdem noch die 2 Mails:
<root@p15142372> /usr/local/iam/iam_report
<root@p15142372> /etc/init.d/iptables dump >/dev/null
Als Ausgabe von deinem Befehl, habe ich bekommen :
/var/spool/cron/tabs/root:2,32 * * * * /usr/local/iam/iam_report
Kommen trotzdem noch die 2 Mails:
<root@p15142372> /usr/local/iam/iam_report
<root@p15142372> /etc/init.d/iptables dump >/dev/null
Als Ausgabe von deinem Befehl, habe ich bekommen :
/var/spool/cron/tabs/root:2,32 * * * * /usr/local/iam/iam_report
-
captaincrunch
- Userprojekt

- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Problem mit Crontab und IAM
War mir bewusst. Mit dem Befehl hast du nur rausbekommen, wo der Cronjob steckt. Da der Eintrag in der Crontab von root ist, meldest du dich als root an, und nimmst ihn halt simpelst raus. ;)Kommen trotzdem noch die 2 Mails:
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Re: Problem mit Crontab und IAM
besten dank :) hat geholfen
Andere Frage.... immer wenn ich die Updates mit Confixx ausführe zum Traffic zählen Speicherplatz usw. zeigt er mir keine neuen werte an. Habe gestern Abend auf web1 100 MB hochgeladen und er zeigt immer noch 546 KB an, trotz mehrmaligen ausführen der counterscripts. Ich bekomme auch keinen error.
In welchen crontab müsste ich rein gucken, mit ich sehen kann ob die cons für confixx überhaupt noch da sind?
Andere Frage.... immer wenn ich die Updates mit Confixx ausführe zum Traffic zählen Speicherplatz usw. zeigt er mir keine neuen werte an. Habe gestern Abend auf web1 100 MB hochgeladen und er zeigt immer noch 546 KB an, trotz mehrmaligen ausführen der counterscripts. Ich bekomme auch keinen error.
In welchen crontab müsste ich rein gucken, mit ich sehen kann ob die cons für confixx überhaupt noch da sind?
Re: Problem mit Crontab und IAM
Hi
die Mails kommen leider immer noch
in der crontab root steht aber nur noch folgendes:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.1191 installed on Sat Sep 20 14:05:41 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
@reboot /etc/init.d/iptables start
Ideen?
die Mails kommen leider immer noch
in der crontab root steht aber nur noch folgendes:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.1191 installed on Sat Sep 20 14:05:41 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
@reboot /etc/init.d/iptables start
Ideen?
Re: Problem mit Crontab und IAM
Das ist wirklich dein komplettes crontab? da steht nicht mehr drin?
Ciao Christian
Ciao Christian
Re: Problem mit Crontab und IAM
Hi
das ist das was in /var/spool/cron/tabs/ im root file drin steht.
Ich habe gemerkt das man ja das iptables file auch ändern musste...
nun weis ich aber ned mehr was ich da geändert habe...in iptables steht folgendes:
#! /bin/sh
#
# iptables ip accounting
#
# chkconfig: 2345 08 92
# description: iptables ip accounting
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=iptables
DESC="iptables ip accounting"
DUMPFILE=/usr/local/iam/dump
#set -x
extif=eth0
extip=217.160.201.79
intif=lo
hq=212.95.126.8/29
intnet=195.20.224.72
ip_local_port_range=`cat /proc/sys/net/ipv4/ip_local_port_range|tr 't' ':'`
start_firewall() {
flush
allow_all
# free of charge
new_chain local
acc_ip local $intnet
acc_ip local $extip
iptables -A OUTPUT -o $intif -j local
iptables -A INPUT -i $intif -j local
# internet services
new_chain www
acc_port www www
acc_port www https
acc_port www 22202 # Caudium Config
new_chain ftp
acc_port ftp ftp-data:ftp
new_chain rsync
acc_port rsync rsync
new_chain cvs
acc_port cvs 2401:2404
new_chain mail
acc_port mail smtp
acc_port_out mail smtp
new_chain misc
acc_port misc ssh
acc_port misc domain
acc_port misc domain udp
acc_port misc auth
new_chain outgoing
acc_port_out outgoing 0:1024
acc_port_out outgoing 0:1024 udp
new_chain ip_local_port_range
acc_port ip_local_port_range $ip_local_port_range
acc_port_out ip_local_port_range $ip_local_port_range
# other traffic (unspecified)
new_chain fragment
acc_ip fragment 0/0 -f
new_chain unknown
acc_ip unknown 0/0
}
# acc_ip table ip [args]
acc_ip () {
CHAIN=$1; shift
IP=$1; shift
iptables -A OUTPUT -o $extif -d $IP -j $CHAIN "$@"
iptables -A INPUT -i $extif -s $IP -j $CHAIN "$@"
}
# acc_port table port [protocol]
acc_port () {
iptables -A OUTPUT -o $extif -p ${3:-tcp} --sport $2 -j $1
iptables -A INPUT -i $extif -p ${3:-tcp} --dport $2 -j $1
}
# acc_port_out table port [protocol]
acc_port_out () {
iptables -A OUTPUT -o $extif -p ${3:-tcp} --dport $2 -j $1
iptables -A INPUT -i $extif -p ${3:-tcp} --sport $2 -j $1
}
new_chain() {
CHAIN=$1; shift
TARGET=$1; shift
iptables -N $CHAIN
iptables -A $CHAIN -j ${TARGET:-ACCEPT} "$@"
}
deny_all() {
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
iptables -t filter -P OUTPUT DROP
}
allow_all() {
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t filter -P OUTPUT ACCEPT
}
dump_stats() {
DATE=`date '+%Y%m%d%H%M%S'`
echo "START $DATE" >> $DUMPFILE
iptables -vnxZ -L --line-numbers -t filter >> $DUMPFILE
#iptables -vnxZ -L --line-numbers -t nat >> $DUMPFILE
echo "END $DATE" >> $DUMPFILE
}
flush() {
dump_stats
iptables -t filter -F
iptables -t filter -X
}
status() {
echo
echo "**** Filter Tables:"
echo
iptables -vnx -L --line-numbers -t filter
#iptables -vnx -L --line-numbers -t nat
echo
}
case "$1" in
start)
echo -n "Starting $DESC: "
start_firewall
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
flush
allow_all
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration:"
start_firewall
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
flush
allow_all
sleep 1
start_firewall
echo "$NAME."
;;
status)
echo "Current $DESC configuration:"
status
;;
dump)
echo "Writing $DESC stats: $DUMPFILE"
dump_stats
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload|status|dump}" >&2
exit 1
;;
esac
exit 0
Auch wenn ich oben den Dumpfile eintrag raus nehme macht er weiter....habe iptables auch schon desinstalliert und wieder installiert, kein erfolg
das ist das was in /var/spool/cron/tabs/ im root file drin steht.
Ich habe gemerkt das man ja das iptables file auch ändern musste...
nun weis ich aber ned mehr was ich da geändert habe...in iptables steht folgendes:
#! /bin/sh
#
# iptables ip accounting
#
# chkconfig: 2345 08 92
# description: iptables ip accounting
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=iptables
DESC="iptables ip accounting"
DUMPFILE=/usr/local/iam/dump
#set -x
extif=eth0
extip=217.160.201.79
intif=lo
hq=212.95.126.8/29
intnet=195.20.224.72
ip_local_port_range=`cat /proc/sys/net/ipv4/ip_local_port_range|tr 't' ':'`
start_firewall() {
flush
allow_all
# free of charge
new_chain local
acc_ip local $intnet
acc_ip local $extip
iptables -A OUTPUT -o $intif -j local
iptables -A INPUT -i $intif -j local
# internet services
new_chain www
acc_port www www
acc_port www https
acc_port www 22202 # Caudium Config
new_chain ftp
acc_port ftp ftp-data:ftp
new_chain rsync
acc_port rsync rsync
new_chain cvs
acc_port cvs 2401:2404
new_chain mail
acc_port mail smtp
acc_port_out mail smtp
new_chain misc
acc_port misc ssh
acc_port misc domain
acc_port misc domain udp
acc_port misc auth
new_chain outgoing
acc_port_out outgoing 0:1024
acc_port_out outgoing 0:1024 udp
new_chain ip_local_port_range
acc_port ip_local_port_range $ip_local_port_range
acc_port_out ip_local_port_range $ip_local_port_range
# other traffic (unspecified)
new_chain fragment
acc_ip fragment 0/0 -f
new_chain unknown
acc_ip unknown 0/0
}
# acc_ip table ip [args]
acc_ip () {
CHAIN=$1; shift
IP=$1; shift
iptables -A OUTPUT -o $extif -d $IP -j $CHAIN "$@"
iptables -A INPUT -i $extif -s $IP -j $CHAIN "$@"
}
# acc_port table port [protocol]
acc_port () {
iptables -A OUTPUT -o $extif -p ${3:-tcp} --sport $2 -j $1
iptables -A INPUT -i $extif -p ${3:-tcp} --dport $2 -j $1
}
# acc_port_out table port [protocol]
acc_port_out () {
iptables -A OUTPUT -o $extif -p ${3:-tcp} --dport $2 -j $1
iptables -A INPUT -i $extif -p ${3:-tcp} --sport $2 -j $1
}
new_chain() {
CHAIN=$1; shift
TARGET=$1; shift
iptables -N $CHAIN
iptables -A $CHAIN -j ${TARGET:-ACCEPT} "$@"
}
deny_all() {
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
iptables -t filter -P OUTPUT DROP
}
allow_all() {
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t filter -P OUTPUT ACCEPT
}
dump_stats() {
DATE=`date '+%Y%m%d%H%M%S'`
echo "START $DATE" >> $DUMPFILE
iptables -vnxZ -L --line-numbers -t filter >> $DUMPFILE
#iptables -vnxZ -L --line-numbers -t nat >> $DUMPFILE
echo "END $DATE" >> $DUMPFILE
}
flush() {
dump_stats
iptables -t filter -F
iptables -t filter -X
}
status() {
echo
echo "**** Filter Tables:"
echo
iptables -vnx -L --line-numbers -t filter
#iptables -vnx -L --line-numbers -t nat
echo
}
case "$1" in
start)
echo -n "Starting $DESC: "
start_firewall
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
flush
allow_all
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration:"
start_firewall
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
flush
allow_all
sleep 1
start_firewall
echo "$NAME."
;;
status)
echo "Current $DESC configuration:"
status
;;
dump)
echo "Writing $DESC stats: $DUMPFILE"
dump_stats
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload|status|dump}" >&2
exit 1
;;
esac
exit 0
Auch wenn ich oben den Dumpfile eintrag raus nehme macht er weiter....habe iptables auch schon desinstalliert und wieder installiert, kein erfolg
Re: Problem mit Crontab und IAM
Hi
jetzt kommt immer
/etc/init.d/iptables: line 121: $DUMPFILE: ambiguous redirect
per Mail
Kann mir mal jemand zeigen wie seine iptables file aussieht? vielleicht bekomme ich es dann wieder hin.
wie gesagt neu installieren von iptables hilft nichts, anscheinned berühert er bei der installation von iptables das file nicht. was ich mir aber nur schwer vorstellen kann.
jetzt kommt immer
/etc/init.d/iptables: line 121: $DUMPFILE: ambiguous redirect
per Mail
Kann mir mal jemand zeigen wie seine iptables file aussieht? vielleicht bekomme ich es dann wieder hin.
wie gesagt neu installieren von iptables hilft nichts, anscheinned berühert er bei der installation von iptables das file nicht. was ich mir aber nur schwer vorstellen kann.
-
captaincrunch
- Userprojekt

- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Problem mit Crontab und IAM
Wie wär's denn, wenn du einfach mal den Aufruf auf das iptables-initscript rausnehmen würdest ? Sofern du kein IAM mehr nutzt ist das ohnehin überflüssig.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Re: Problem mit Crontab und IAM
wie heisst der abschnitt genau, den du ansprichst? danke für deine hilfe
-
captaincrunch
- Userprojekt

- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Problem mit Crontab und IAM
Ich rede von diesem (@reboot /etc/init.d/iptables start) Eintrag, von dem du sagst, dass er immer noch in der root-Crontab steht.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Re: Problem mit Crontab und IAM
danke, habs entfernt....schaun wir mal.
Hast du noch eine Idee zu dem Confixx Problem?
Hast du noch eine Idee zu dem Confixx Problem?
Re: Problem mit Crontab und IAM
ok ich jetzt bekomme ich deswegen immer das als mail:
/etc/init.d/iptables: line 121: $DUMPFILE: ambiguous redirect
/etc/init.d/iptables: line 122: $DUMPFILE: ambiguous redirect
/etc/init.d/iptables: line 124: $DUMPFILE: ambiguous redirect
/etc/init.d/iptables: line 121: $DUMPFILE: ambiguous redirect
/etc/init.d/iptables: line 122: $DUMPFILE: ambiguous redirect
/etc/init.d/iptables: line 124: $DUMPFILE: ambiguous redirect
-
captaincrunch
- Userprojekt

- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Problem mit Crontab und IAM
grep -r iptables /var/spool/*
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Re: Problem mit Crontab und IAM
wenn ich das eingebe tut sich nichts, der courser wandert eine zeile weiter runter aber da gleich am anfang, kein prompt da , und dann gehts ned weiter