Mailinglist Archive: opensuse-security (320 mails)

< Previous Next >
Seccheck script errors - anything I need to worry about?
  • From: "Luke Loh" <lloh@xxxxxxxxxx>
  • Date: Mon, 12 May 2003 08:58:44 +1000
  • Message-id: <6C2BB65AB4C3614E8A3E15FB0862B17C2E7714@xxxxxxxxxxxxxxxxxxxxx>
Dear List

Recently, I've started getting the following message from the seccheck
script:

Cron <root@mail> test -x /usr/lib/secchk/security-control.sh &&
/usr/lib/secchk/security-control.sh daily &

/usr/lib/secchk/security-daily.sh: line 296: [: too many arguments
/usr/lib/secchk/security-daily.sh: line 296: [: too many arguments
/usr/lib/secchk/security-daily.sh: line 296: [: too many arguments
/usr/lib/secchk/security-daily.sh: line 296: [: too many arguments
/usr/lib/secchk/security-daily.sh: line 315: [: too many arguments
/usr/lib/secchk/security-daily.sh: line 315: [: too many arguments

Looking at the offending lines in the script I get:

292 # .rhosts check
293 awk -F: '{ print $1 " " $6 }' /etc/passwd |
294 while read uid homedir; do
295 for j in .rhosts .shosts; do
296 if [ -s ${homedir}/$j ] ; then
297 rhost=`ls -lcdbg ${homedir}/$j|sed
's/[%\]/_/g'`
298 printf "$uid: $rhost\n"
299 test -f "$j" && { # still a race,
however ...
300 if egrep \\+ ${homedir}/$j >
/dev/null ; the n
301 printf "\t(has got a plus (+)
sign!)\n"
302 fi
303 }
304 fi
305 done
306 done > $OUT
307 if [ -s "$OUT" ] ; then
308 printf "\nChecking for users with .rhosts/.shosts
files.\n"
309 cat "$OUT"
310 fi
311 # Check home directories. Directories should not be owned by
someone el se
312 # or writeable.
313 awk -F: '/^[^+-]/ { print $1 " " $6 }' /etc/passwd | \
314 while read uid homedir; do
315 if [ -d ${homedir}/ ] ; then
316 file=`ls -ldb ${homedir}|sed 's/[%\]/_/g'`
317 printf "$uid $file\n"
318 fi
319 done |

My knowledge of awk is limited so I can't figure out what is wrong
except that it's related to the ${homedir} variable.

Is this something I should worry about? Should I just reinstall seccheck
or is there something I need to investigate?

Thank you and regards

Luke Loh
< Previous Next >