getpw(S) 6 January 1993 getpw(S) Name getpw - get user info from UID Syntax cc ... -lc int getpw (uid, buf) int uid; char *buf; Description The getpw routine searches the /etc/passwd file for a user ID number that equals the uid argument. If the user ID is found, getpw copies the line of the password file in which uid was found into the array to which the argument buf points. Upon a successful match, the getpw routine returns a value of zero. If the /etc/passwd file does not exist, cannot be opened, or if uid does not match any ID entry in the password file, getpw fails and returns a non-zero value. This routine is included only for compatibility with prior systems and should not be used; see getpwent(S) for routines to use instead. Return value Upon successful completion, the getpw routine returns a value of zero. getpw returns a non-zero value on error. Files /etc/passwd See also getpwent(S), passwd(FP) Standards conformance The getpw routine is an extension of AT&T System V provided by the Santa Cruz Operation.