PUTPWENT(3) Library Functions Manual PUTPWENT(3)
putpwent - write password file entry
int putpwent(p, f)
struct passwd *p;
putpwent() is the inverse of getpwent(3V). Given a pointer to a passwd
structure created by getpwent() (or getpwuid() or getpwnam), putpwent()
writes a line on the stream f, which matches the format of lines in the
password file /etc/passwd.
putpwent() returns non-zero if an error was detected during its opera-
tion, otherwise zero.
The above routine uses <<stdio.h>>, which increases the size of programs,
not otherwise using standard I/O, more than might be expected.
This routine is of limited utility, since most password files are main-
tained as Network Information Service (NIS) files, and cannot be
updated with this routine.
The Network Information Service (NIS) was formerly known as Sun Yellow
Pages (YP). The functionality of the two remains the same; only the
name has changed.
6 October 1987 PUTPWENT(3)