security.d/chk_passwd

changeset 13
cc078ac2fddd
parent 9
3b982acb3d07
child 14
59e07bba67cc
equal deleted inserted replaced
12:3179bc45c83c 13:cc078ac2fddd
92 if ($1 == "+" ) { 92 if ($1 == "+" ) {
93 if (NF != 1 && $3 == 0) 93 if (NF != 1 && $3 == 0)
94 printf "\tLine %d includes entries with uid 0.\n", NR; 94 printf "\tLine %d includes entries with uid 0.\n", NR;
95 next; 95 next;
96 } 96 }
97 if ($1 !~ /^[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9\$])*$/) 97 if ($1 !~ /^[A-Za-z0-9]([-A-Za-z0-9_]*[A-Za-z0-9\$])*$/)
98 printf "\tLogin %s has non-alphanumeric characters.\n", $1; 98 printf "\tLogin %s has non-alphanumeric characters.\n", $1;
99 if (length($1) > len) 99 if (length($1) > len)
100 printf "\tLogin %s has more than "len" characters.\n", $1; 100 printf "\tLogin %s has more than "len" characters.\n", $1;
101 if ($7 == "" && $8 !~ /!/ && $8 != "*") 101 if ($7 == "" && $8 !~ /!/ && $8 != "*")
102 printf "\tLogin %s does not have a shell\n", $1; 102 printf "\tLogin %s does not have a shell\n", $1;

mercurial