COHERENT manpages

This page displays the COHERENT manpage for getpwnam() [Get password file information, by name].

List of available manpages
Index


getpwnam() -- General Function (libc)

Get password file information, by name
#include <pwd.h>
struct passwd *getpwnam(uname)
char *uname;

The COHERENT  system has  five routines  that search the  file /etc/passwd,
which contains  information about every  user of the  system.  The returned
structure passwd is defined in the  header file pwd.h. For a description of
this structure, see pwd.h.

getpwnam() attempts to find the first entry with a name of uname.

Example

For an example of this function, see the entry for getpwent().

Files

/etc/passwd
pwd.h

See Also

libc
POSIX Standard, §9.2.2

Diagnostics

getpwnam() returns NULL for any error or on end of file.

Notes

All structures  and information  returned are  in static areas  internal to
getpwnam(). Therefore,  information from a previous  call is overwritten by
each subsequent call.

If your  system has implemented shadow passwords, you  must use the shadow-
password  routine getspnam()  to retrieve  records that  contain passwords.
For details, see this function's entry in the Lexicon.