.TH getgrnam() "" "" "General Function (libc)"
.PC "Get group file information, by group name"
.B "#include <grp.h>"
\fBstruct group *getgrnam(\fIgname\^\fB);\fR
\fBchar *\fIgname\^\fB;\fR
.PP
.B getgrnam()
searches file
.B /etc/group
for the first entry with a group name of
.IR gname .
It returns a pointer to the entry for
.I gname
if it is found; it returns NULL for any error or if the end of the
file is encountered.
.SH Files
.B /etc/group
.br
.B <grp.h>
.SH "See Also"
.Xr "group," group
.Xr "libc" libc
.br
\*(PX Standard, \(sc9.2.1
.SH Notes
All structures and information returned are
in a static area internal to
.BR getgrnam() .
Therefore,
information from a previous call is overwritten by each
subsequent call.
