Problem with periodically done scripts

Daniel Bye dan at slightlystrange.org
Fri Jul 25 06:12:02 PDT 2003


On Fri, Jul 25, 2003 at 02:39:11PM +0200, Peter Rosa wrote:
> Dear Luke,
> 
> thank you for helping. It is, of course possible, but on that machine
> areonly 10 users, no one is added from 2001. Passwd is not the only file,
> because whole security log seems as follows:
> 
> Checking setuid files and devices:
> 
> 
> Checking for uids of 0:
> root 0
> toor 0
> [: 0: unexpected operator
> 
> Checking for passwordless accounts:
> [: 0: unexpected operator
> 
> hostname login failures:
> [: 0: unexpected operator
> 
> hostname refused connections:
> [: 0: unexpected operator
> 
> hostname checking for denied secondary zone transfers:
> [: 0: unexpected operator
> 
> It seems to be an error of awk, which is used inside /etc/security script
> (but not the only one). I have recompiled sed, sh but I can not reinstall
> awk, as it is not in the port, nor /usr/src sub-tree.

No, it's an error from [, a synonym (almost) for `test'.  

> Any solution ?

Try turning on the shell's xtrace facility - add ` -x' (without quotes) to 
the first line of the failing script:

#!/bin/sh -x
         ^^^

Next time it runs, the output should show you where in the script the error
is generated.  If that still doesn't give you enough information to fix it,
try posting again with some of the trace attached.

Make sure to remove the ` -x' when you have fixed problem!

HTH

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030725/6caff543/attachment.bin


More information about the freebsd-questions mailing list