Made netgroup support more generic