1.\" Copyright (c) 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)getpw.3 8.1 (Berkeley) 06/04/93 7.\" 8.Dd 9.Dt GETPW 3 10.Os 11.Sh NAME 12.Nm getpw 13.Nd get name from uid 14.Sh SYNOPSIS 15.Fn getpw uid "char *buf" 16.Sh DESCRIPTION 17.Bf -symbolic 18The getpw function is made obsolete by getpwuid(3). 19.br 20It is available from the compatibility library, libcompat. 21.Ef 22.Pp 23The 24.Fn getpw 25function reads the file 26.Pa /etc/passwd , 27and if it finds 28the specified 29.Fa uid , 30copies the password entry line into the string pointed to by 31.Fa buf . 32the null terminated entry line from the password database, 33and appends the 34.Dv NUL 35character. 36.Sh RETURN VALUES 37The 38.Fn getpw 39function returns the zero if successful, otherwise 40a non-zero if the entry does not exist. 41.Sh FILES 42.Bl -tag -width /etc/passwd - compact 43.It Pa /etc/passwd 44.El 45.Sh SEE ALSO 46.Xr getpwent 3 , 47.Xr passwd 5 48.Sh HISTORY 49A 50.Fn getpw 51function appeared in 52.At v6 . 53