putpwent(3)
NAME
putpwent − write password file entry
SYNTAX
#include <pwd.h>
int putpwent (p, f)
struct passwd ∗p;
FILE ∗f;
DESCRIPTION
The putpwent subroutine is the inverse of getpwent(.). Given a pointer to a passwd structure created by getpwent (or getpwuid or getpwnam), putpwuid writes a line on the stream f which matches the format of /etc/passwd.
DIAGNOSTICS
The putpwent subroutine returns non-zero if an error was detected during its operation, otherwise zero.
WARNING
The above routine uses <stdio.h>, which causes it to increase the size of programs, not otherwise using standard I/O, more than might be expected.