Cover V10, I09

Article
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5

sep2001.tar


Listing 4 password file check

#!/usr/bin/awk -f
#
# simple password file checking routine, modified from CERT and various
# looks for uid 0 accounts not root and empty passwords
#
BEGIN { FS = ":" }

{ if ($2 == "") { 
    print "------ empty password for account " $1 }
  if (($3 ~/^00*/) && ($1 != "root")) {
    print "------ user has a uid of zero: " $1 }
}