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 }
}
|