function users_getvogroup () {

if [ $# -ne 1 ]; then
    echo "$0: supply a VO as an argument"
    return 1
fi

# Take the groups of all entries belonging to the vo and without a specific tag
# Output the most numerous result - this should be the vo group

return=`awk -F: '$6=="" && $5 == tolower(virtorg){print $4}' virtorg=$1 ${USERS_CONF} | sort | uniq -c | sort -n -k 1,1 | tail -1 | awk '{print $2}'`

if [ "$return" ]; then
    echo $return
    return 0
else
    echo "$FUNCNAME: could not find group for $1 in ${USERS_CONF}" 1>&2
    return 1
fi

}
