periodic 800.loginfail problems

Conrad J. Sabatier conrads at cox.net
Thu Nov 25 14:10:30 PST 2004


On Wed, 2004-11-24 at 07:32 -0800, Ron Gilbert wrote:
> The script /etc/periodic/security/800.loginfail seems to have some 
> problems, or something else on my system is interfering with it.
> 
> The problem seems to be the catmsgs() function returns the contents of 
> the auth.log file without any EOL's, so the following grep:
> 
> grep -ia "^$yesterday.*(fail|illegal user)"
> 
> fails due to the ^ anchor condition never being met.
> 
> Is there something set on my system that is causing this?  Or is this a 
> general bug, or is it not a bug at all?
> 
> Is there a better place to be asking these questions?
> 
> Thanks, Ron

What version of FreeBSD are you running, and which revision of the
script are you using?  Mine here (under 6.0-CURRENT) shows:

# $FreeBSD: src/etc/periodic/security/800.loginfail,v 1.5 2003/01/05
21:32:50 se Exp $

The line I assume you're referring to differs in this version from what
you're showing:

    n=$(catmsgs | grep -ia "^$yesterday.*fail" |
        tee /dev/stderr | wc -l)

And it seems to be working just fine.

-- 
Conrad J. Sabatier -- conrads at cox.net -- "In Unix veritas"




More information about the freebsd-newbies mailing list