.TH getpwuid() "" "" "General Function (libc)"
.PC "Get password file information, by id"
.B "#include <pwd.h>"
\fBstruct passwd *getpwuid(\fIuid\^\fB)\fR
\fBint \fIuid\^\fB;\fR
.PP
The \*(CO system has five routines that search the file
.BR /etc/passwd ,
which contains information about every user of the system.
The returned structure
.B passwd
is defined in the header file
.BR pwd.h .
For more information on this structure, see
.BR pwd.h .
.PP
.B getpwuid()
attempts to find the first entry with a numerical user id of
.IR uid .
.SH Example
For an example of this function, see the entry for
.BR getpwent() .
.SH Files
.B /etc/passwd
.br
.B pwd.h
.SH "See Also"
.Xr "libc" libc
.br
\*(PX Standard, \(sc9.2.2
.SH Diagnostics
.B getpwuid()
returns NULL for any error or on end of file.
.SH Notes
All structures and information returned are
in static areas internal to
.BR getpwuid() .
Therefore, information from a previous call is overwritten by each
subsequent call.
