Please check the manual page setnetgrent(3).