.\" @(#)getpwent.3 6.3 (Berkeley) %G%
getpwent, getpwuid, getpwnam, setpwent, endpwent, setpwfile \- get password file entry
.B struct passwd *getpwuid(uid)
.B struct passwd *getpwnam(name)
.B struct passwd *getpwent()
each return a pointer to an object with the
containing the broken-out
fields of a line in the password file.
are unused; the others have meanings described in
Searching of the password file is done using the \fIndbm\fP
database access routines.
search the database (opening it if necessary) for a matching
EOF is returned if there is no entry.
For programs wishing to read the entire database,
line (opening the database if necessary).
In addition to opening the database,
begin its search from the beginning of the database.
changes the default password file to
thus allowing alternate password files to be used.
should be called prior to it.
getlogin(3), getgrent(3), passwd(5)
return a null pointer (0) on EOF or error.
is contained in a static area
so it must be copied if it is