[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    getpw(3C) manual page Table of Contents

Name

getpw - get passwd entry from UID

Synopsis

#include <stdlib.h>

int getpw(uid_t uid, char *buf);

MT-Level

Safe

Description

getpw() searches the user data base for a user id number that equals uid, copies the line of the password file in which uid was found into the array pointed to by buf, and returns 0. getpw() returns non-zero if uid cannot be found.

This routine is included only for compatibility with prior systems and should not be used; see getpwnam(3C) for routines to use instead.

Return Values

getpw() returns non-zero on error.

Files

/etc/passwd

See Also

getpwnam(3C) , passwd(4)

Notes

If the /etc/passwd and the /etc/group files have the ‘‘+’’ for the NIS entry, then getpwent() and getgwent() will not return NULL when the end of file is reached.


Table of Contents