Funktion für das Anzeigen aller Mitglieder der Gruppe wheel

Funktion für das Anzeigen aller Mitglieder der Gruppe wheel

LIST_MEMBER_WHEEL ()
{
# generate user list of users
for username in $(dscl . list /Users UniqueID | awk ' { print $1 }'); do
# Checks to see which usernames are reported as being admins. The
# check is running dsmemberutil's check membership and listing the
# accounts that are being reported as wheel group users. Actual check is
# for accounts that are NOT not an admin (i.e. not standard users.)
if [[ $(dsmemberutil checkmembership -U "${username}" -G wheel) != *not* ]]; then
# Any reported accounts are added to the array list
list_root+=("${username}")
fi
done
echo ${list_root[@]} | tee -a ${SUMMARY_FILE}
}