Ignore comments in /etc/passwd

PR:		25845
Submitted by:	Udo Schweigert <ust@cert.siemens.de>
This commit is contained in:
Brian Somers 2001-03-17 21:22:29 +00:00
parent d0a47967d8
commit d552710cfb

View File

@ -117,7 +117,7 @@ fi
separator
echo 'Checking for uids of 0:'
n=$(awk -F: '$3==0 {print $1,$3}' /etc/master.passwd |
n=$(awk -F: '/^#/ {next} $3==0 {print $1,$3}' /etc/master.passwd |
tee /dev/stderr |
sed -e '/^root 0$/d' -e '/^toor 0$/d' |
wc -l)