The getgrnam function searches the group database for an entry with a matching name, and returns a pointer to the group structure containing the matching entry.