#!/bin/sh
# for each user that's listed as a group member, make
# sure there is corresponding /etc/passwd entry
for USER in `cat /etc/group|cut -d: -f4|tr , '\n' |sort|uniq|grep -v '^$' `
do
if ! grep ^${USER}: /etc/passwd >gt; /dev/null; then echo $0 found stray user ${USER} in /etc/group. ; fi
done | xargs echo