From owner-freebsd-questions@FreeBSD.ORG Fri Jul 25 11:52:12 2003 Return-Path: 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 5D90537B401 for ; Fri, 25 Jul 2003 11:52:12 -0700 (PDT) Received: from aviti.net (aviti.net [217.144.68.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 331E843FA3 for ; Fri, 25 Jul 2003 11:52:11 -0700 (PDT) (envelope-from life@zone3000.net) Received: from zone3000.kharkov.ua ([217.144.68.98] helo=adserver.zone3000.net) by aviti.net with esmtp (Exim 4.14) id 19g7fk-0002yx-4a for freebsd-questions@freebsd.org; Fri, 25 Jul 2003 21:52:08 +0300 Received: from narik ([10.1.1.36]) by adserver.zone3000.net with Microsoft SMTPSVC(5.0.2195.5329); Fri, 25 Jul 2003 21:57:54 +0300 Message-ID: <028101c352dd$d87ee230$2401010a@zone3000.net> From: "Vitali Malicky" To: "freebsd-questions" References: <020d01c352dc$0ef7a7e0$3501a8c0@pro.sk> Date: Fri, 25 Jul 2003 21:52:06 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-OriginalArrivalTime: 25 Jul 2003 18:57:54.0687 (UTC) FILETIME=[A7BC78F0:01C352DE] X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *19g7fk-0002yx-4a*DxF0AEtOlwM* Subject: Re: Problem with periodically done scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Vitali Malicky List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 18:52:12 -0000 > I'm asking again, as there is no response up now. You forgot to say "please", sir... 8-| > > As for me, now it seems as.... I don't know what's the error here, I have > never seen that listings (using -x switch). try my scripts, I never have any problems with them, so don't even understan what you're about... 300.chkuid0 ========= #!/bin/sh - if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf source_periodic_confs fi case "$daily_status_security_chkuid0_enable" in [Yy][Ee][Ss]) echo "" echo 'Checking for uids of 0:' n=$(awk -F: '/^#/ {next} $3==0 {print $1,$3}' /etc/master.passwd | tee /dev/stderr | sed -e '/^root 0$/d' -e '/^toor 0$/d' | wc -l) [ $n -gt 0 ] && rc=1 || rc=0;; *) rc=0;; ============ 400.passwdless ============ #!/bin/sh - if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf source_periodic_confs fi case "$daily_status_security_passwdless_enable" in [Yy][Ee][Ss]) echo "" echo 'Checking for passwordless accounts:' n=$(awk -F: 'NF > 1 && $1 !~ /^[#+-]/ && $2=="" {print $0}' /etc/master.passwd | tee /dev/stderr | wc -l) [ $n -gt 0 ] && rc=1 || rc=0;; *) rc=0;; esac exit "$rc" =========================== > > Peter Rosa > > > > ----- Original Message ----- > From: "Peter Rosa" > To: > Cc: "freebsd-questions" > Sent: Friday, July 25, 2003 6:59 PM > Subject: Re: Problem with periodically done scripts > > > > Here is complete listing. Do you have any idea ? > > > > + echo Checking for uids of 0: > > Checking for uids of 0: > > + awk -F: $3==0 {print $1,$3} /etc/master.passwd > > + tee /dev/stderr > > root 0 > > toor 0 > > + sed -e /^root 0$/d -e /^toor 0$/d > > + wc -l > > + n= > > + [ -gt 0 -a -lt 1 ] > > [: 0: unexpected operator > > + echo Checking for passwordless accounts: > > Checking for passwordless accounts: > > + awk -F: NF > 1 && $1 !~ /^[#+-]/ && $2=="" {print $0} /etc/master.passwd > > + tee /dev/stderr > > + wc -l > > + n= > > + [ -gt 0 -a -lt 1 ] > > [: 0: unexpected operator > > > > > > Peter Rosa > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"